import{u as e,r as a,b as l,c as t,d as s,e as o,j as n,k as i,h as m,W as c,Q as d,l as u,ac as g,ae as r}from"./index.1699270951405.js";const f={class:"theme-control space-y-2"},h={class:"labelItem"},p=["src"],b={class:"labelItem"},k={class:"labelItem h-11"},C=o("span",{class:"flex-shrink-0"},"背景模糊",-1),V={class:"labelItem h-11"},v=o("span",{class:"flex-shrink-0"},"开启底部快捷方式",-1),I={class:"labelItem h-11"},x=o("span",{class:"flex-shrink-0"},"时钟字体颜色",-1),w={class:"ml-auto"},y={class:"labelItem h-11"},_=o("span",{class:"flex-shrink-0"},"图标大小",-1),W={__name:"theme",setup(W){const U=e(),z=()=>{window.open(U.state.config.theme.backgroundImage)},j=a(""),Q=e=>{1===e.code&&(U.state.config.theme.backgroundImage=e.data.url,U.commit("updateConfig"))},q=e=>{g("--iconWidth",U.state.config.theme.iconWidth+"px"),U.commit("updateConfig")},A=e=>{U.commit("updateConfig")},B=()=>{U.state.config.theme.backgroundImage=r.theme.backgroundImage,U.commit("updateConfig")};return(e,a)=>{var g,r;const W=l("el-button"),D=l("el-upload"),E=l("el-slider"),F=l("el-switch"),G=l("el-color-picker");return t(),s("div",f,[o("div",h,[o("img",{class:"rounded-lg w-full",style:{"aspect-ratio":"10 / 5.625"},ref_key:"image",ref:j,src:null==(r=null==(g=n(U).state.config)?void 0:g.theme)?void 0:r.backgroundImage,alt:"壁纸"},null,8,p)]),o("div",b,[i(D,{class:"upload-demo","show-file-list":!1,"on-success":Q,action:n(d)+n(U).state.site.upload},{default:m((()=>[i(W,{size:"small",class:"bg-blue-400 mr-2.5",type:"primary"},{default:m((()=>[c("上传")])),_:1})])),_:1},8,["action"]),i(W,{size:"small",type:"danger",class:"bg-pink-400",onClick:u(z,["stop"])},{default:m((()=>[c(" 下载 ")])),_:1},8,["onClick"]),i(W,{size:"small",type:"info",class:"bg-slate-600",onClick:u(B,["stop"])},{default:m((()=>[c(" 默认 ")])),_:1},8,["onClick"])]),o("div",k,[C,i(E,{class:"w-full ml-3",onChange:a[0]||(a[0]=e=>n(U).commit("updateConfig")),max:20,modelValue:n(U).state.config.theme.blur,"onUpdate:modelValue":a[1]||(a[1]=e=>n(U).state.config.theme.blur=e)},null,8,["modelValue"])]),o("div",V,[v,i(F,{onChange:a[2]||(a[2]=e=>n(U).commit("updateConfig")),modelValue:n(U).state.config.theme.tabbar,"onUpdate:modelValue":a[3]||(a[3]=e=>n(U).state.config.theme.tabbar=e),class:"ml-auto"},null,8,["modelValue"])]),o("div",I,[x,o("div",w,[i(G,{modelValue:n(U).state.config.theme.timeColor,"onUpdate:modelValue":a[4]||(a[4]=e=>n(U).state.config.theme.timeColor=e),onChange:A},null,8,["modelValue"])])]),o("div",y,[_,i(E,{class:"w-full ml-3",onChange:q,max:80,min:60,modelValue:n(U).state.config.theme.iconWidth,"onUpdate:modelValue":a[5]||(a[5]=e=>n(U).state.config.theme.iconWidth=e)},null,8,["modelValue"])])])}}};export{W as default};
