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,X as c,Q as d,l as u,ad as g,af as r}from"./index.1701946211972.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),U={__name:"theme",setup(U){const W=e(),z=()=>{window.open(W.state.config.theme.backgroundImage)},j=a(""),Q=e=>{1===e.code&&(W.state.config.theme.backgroundImage=e.data.url,W.commit("updateConfig"))},X=e=>{g("--iconWidth",W.state.config.theme.iconWidth+"px"),W.commit("updateConfig")},q=e=>{W.commit("updateConfig")},A=()=>{W.state.config.theme.backgroundImage=r.theme.backgroundImage,W.commit("updateConfig")};return(e,a)=>{var g,r;const U=l("el-button"),B=l("el-upload"),D=l("el-slider"),E=l("el-switch"),F=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(W).state.config)?void 0:g.theme)?void 0:r.backgroundImage,alt:"壁纸"},null,8,p)]),o("div",b,[i(B,{class:"upload-demo","show-file-list":!1,"on-success":Q,action:n(d)+n(W).state.site.upload},{default:m((()=>[i(U,{size:"small",class:"bg-blue-400 mr-2.5",type:"primary"},{default:m((()=>[c("上传")])),_:1})])),_:1},8,["action"]),i(U,{size:"small",type:"danger",class:"bg-pink-400",onClick:u(z,["stop"])},{default:m((()=>[c(" 下载 ")])),_:1},8,["onClick"]),i(U,{size:"small",type:"info",class:"bg-slate-600",onClick:u(A,["stop"])},{default:m((()=>[c(" 默认 ")])),_:1},8,["onClick"])]),o("div",k,[C,i(D,{class:"w-full ml-3",onChange:a[0]||(a[0]=e=>n(W).commit("updateConfig")),max:20,modelValue:n(W).state.config.theme.blur,"onUpdate:modelValue":a[1]||(a[1]=e=>n(W).state.config.theme.blur=e)},null,8,["modelValue"])]),o("div",V,[v,i(E,{onChange:a[2]||(a[2]=e=>n(W).commit("updateConfig")),modelValue:n(W).state.config.theme.tabbar,"onUpdate:modelValue":a[3]||(a[3]=e=>n(W).state.config.theme.tabbar=e),class:"ml-auto"},null,8,["modelValue"])]),o("div",I,[x,o("div",w,[i(F,{modelValue:n(W).state.config.theme.timeColor,"onUpdate:modelValue":a[4]||(a[4]=e=>n(W).state.config.theme.timeColor=e),onChange:q},null,8,["modelValue"])])]),o("div",y,[_,i(D,{class:"w-full ml-3",onChange:X,max:80,min:60,modelValue:n(W).state.config.theme.iconWidth,"onUpdate:modelValue":a[5]||(a[5]=e=>n(W).state.config.theme.iconWidth=e)},null,8,["modelValue"])])])}}};export{U as default};
