import{k as e,$ as a}from"./utils-lib.js?v=1761009159";import{c as s,w as l,H as t,v as o,x as u,I as i,y as m,N as r,B as d,e as p,z as n,F as c,b0 as _,J as f,C as b,an as v,ab as h,ak as x,al as j,G as V,a9 as k}from"./base-lib.js?v=1761009159";import{V as y,p as C,f as g,W as w,X as F,Y as U,Z as H,e as R,_ as z}from"./useController14.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useStore4.js?v=1761009159";const B={class:"p-[20px]"},G={class:"mt-[1.6rem]"},I={class:"flex items-center"},J={class:"ml-[20px]"},N=s({__name:"setting-cache",setup:s=>(l(()=>C.value.proxy_cache,e=>{var a;if(e){y.status=e.cache_status;let s="1",l="d";(null==(a=e.expires)?void 0:a.length)>1&&(s=e.expires.slice(0,-1),l=e.expires.slice(-1)),y.time=s,y.unit=l}}),(s,l)=>{const C=v,N=h,S=e,W=x,X=j,Y=V,Z=k,$=a,q=t("bt-loading");return o(),u("div",B,[i((o(),r(Z,{ref_key:"cacheFormRef",ref:H,class:"h-[38rem]",model:m(y),"label-width":"100px",rules:s.cacheFormRules,disabled:m(R)},{default:d(()=>[p(N,{label:"缓存开关",prop:"status"},{default:d(()=>[p(C,{modelValue:m(y).status,"onUpdate:modelValue":l[0]||(l[0]=e=>m(y).status=e),onChange:m(w)},null,8,["modelValue","onChange"])]),_:1}),i(n("div",G,[p(N,{label:"缓存时间",prop:"time"},{default:d(()=>[n("div",I,[p(S,{modelValue:m(y).time,"onUpdate:modelValue":l[1]||(l[1]=e=>m(y).time=e)},null,8,["modelValue"]),p(N,{prop:"unit"},{default:d(()=>[p(X,{class:"ml-[1rem] !w-[8rem]",modelValue:m(y).unit,"onUpdate:modelValue":l[2]||(l[2]=e=>m(y).unit=e),placeholder:"请选择"},{default:d(()=>[(o(!0),u(c,null,_(m(F),e=>(o(),r(W,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1})],512),[[f,m(y).status]]),p(N,{label:" "},{default:d(()=>[i(p(Y,{type:"primary",class:"!mt-[1.6rem]",onClick:m(U)},{default:d(()=>l[3]||(l[3]=[b("保存",-1)])),_:1,__:[3]},8,["onClick"]),[[f,m(y).status]])]),_:1})]),_:1},8,["model","rules","disabled"])),[[q,m(g)]]),n("div",J,[p($,{options:m(z)},null,8,["options"])])])})});export{N as default};
