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