"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[7161],{77161:(t,e,i)=>{i.r(e),i.d(e,{default:()=>I});var s=i(13234),a=i(57268),l=i(29445),n=i(94209),o=i(45069),c=i(95329),x=i(10435),p=i(53669),r=i(63477),f=i(74003),u=i(6131);const w={id:"settings-backup",class:"px-[70px] py-[40px]"},d={class:"flex flex-1 items-center"},_={class:"mr-[20px] h-[48px] w-[48px] flex-shrink-0 overflow-hidden rounded-full"},b=["src"],m={key:1,class:"iconfont icon-dengdaisousuo text-[48px] text-color-t4"},g={class:"flex1 justify-self-start"},y={class:"block max-w-[200px] grow-0 overflow-hidden text-ellipsis whitespace-nowrap text-[18px] text-color-t1"},h=(t=>((0,a.dD)("data-v-2a0b7e57"),t=t(),(0,a.Cn)(),t))((()=>(0,a._)("div",{class:"h-[12px] w-[12px] flex-shrink-0"},[(0,a._)("i",{class:"iconfont icon-arrow_icon text-[12px] text-color-t1"})],-1))),k={class:"mt-[20px] w-full text-left font-ali-75 text-[16px] text-color-t2"},v={class:"mt-[20px] flex items-center justify-between"},S={class:"flex h-[41px] flex-wrap content-between"},D={class:"w-full text-[14px] text-color-t2"},U={class:"w-full font-ali-55 text-[12px] text-color-t3"},C={class:"mt-[20px] flex items-center justify-between"},j={class:"flex h-[41px] flex-wrap content-between"},T={class:"w-full text-[14px] text-color-t2"},Z={class:"w-full font-ali-55 text-[12px] text-color-t3"},z=(0,a.aZ)({__name:"settings-backup",setup(t){const e=(0,o.o)(),i=(0,c.useUserStore)(),z=(0,p.i)(),{loginShow:I,isLogin:J,user:W}=(0,x.Jk)(i),q=()=>{J.value?e.settingHomeView="userInfo":I.value=!0},A=async()=>{const t=await z.exportData();(0,r.Bq)(t,f.sM?"wetab-":"hitab-")},B=async()=>{const t=await(0,r.Y)(".data,text/hitab,text/plain,application/json","readAsText");await z.importData(JSON.parse(t))};return(t,e)=>{const i=s.Z;return(0,a.wg)(),(0,a.iD)("div",w,[(0,a._)("button",{class:"flex w-full items-center justify-between border-b-[1px] border-color-m2 border-opacity-[0.06] pb-[20px]",onClick:q},[(0,a._)("div",d,[(0,a._)("div",_,[(0,l.SU)(J)?((0,a.wg)(),(0,a.iD)("img",{key:0,src:(0,l.SU)(W).avatar||(0,l.SU)(u.c)},null,8,b)):((0,a.wg)(),(0,a.iD)("i",m))]),(0,a._)("div",g,[(0,a._)("span",y,(0,n.toDisplayString)((0,l.SU)(J)?(0,l.SU)(W).nickname:"登录/注册"),1)])]),h]),(0,a._)("button",k,(0,n.toDisplayString)("备份数据"),1),(0,a._)("div",v,[(0,a._)("div",S,[(0,a._)("span",D,(0,n.toDisplayString)("导出备份数据"),1),(0,a._)("span",U,(0,n.toDisplayString)("将本地数据导出"),1)]),(0,a.Wm)(i,{size:"medium",icon:"icon-export_icon text-[20px]",onClick:A},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.toDisplayString)("导出"),1)])),_:1})]),(0,a._)("div",C,[(0,a._)("div",j,[(0,a._)("span",T,(0,n.toDisplayString)("导入备份数据"),1),(0,a._)("span",Z,(0,n.toDisplayString)("将本地数据导入"),1)]),(0,a.Wm)(i,{size:"medium",icon:"icon-import_icon text-[20px]",onClick:B},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.toDisplayString)("导入"),1)])),_:1})])])}}});const I=(0,i(76911).Z)(z,[["__scopeId","data-v-2a0b7e57"]])}}]);