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 i,I as u,y as m,N as d,B as r,e as p,z as n,F as c,b0 as _,J as f,C as b,an as x,ab as h,al as j,G as v,b1 as k,a9 as V,ak as y}from"./base-lib.js?v=1761009159";import{o as C,f as g,c as w,t as U,a as F,b as H,d as z,e as B,g as G,h as I}from"./index473.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 J={class:"p-[20px]"},N={class:"pt-[1.6rem]"},O={class:"flex items-center"},R={class:"ml-[20px]"},S=s({__name:"cache",setup:(s,{expose:S})=>(l(()=>I.value.proxy_cache,e=>{if(e&&Object.keys(e).length>0){w.status=e.cache_status;let a="1",s="d";e.expires.length>1&&(a=e.expires.slice(0,-1),s=e.expires.slice(-1)),w.time=a,w.unit=s}},{immediate:!0}),S({onConfirm:C}),(s,l)=>{const I=x,S=h,$=e,q=y,A=j,D=v,E=k,K=V,L=a,M=t("bt-loading");return o(),i("div",J,[u((o(),d(K,{ref_key:"cacheFormRef",ref:H,class:"h-[40rem]",model:m(w),"label-width":"100px",rules:m(z),disabled:m(B)},{default:r(()=>[p(S,{label:"缓存开关",prop:"status"},{default:r(()=>[p(I,{modelValue:m(w).status,"onUpdate:modelValue":l[0]||(l[0]=e=>m(w).status=e),onChange:m(C)},null,8,["modelValue","onChange"])]),_:1}),u(n("div",N,[p(S,{label:"缓存时间",prop:"time"},{default:r(()=>[n("div",O,[p($,{modelValue:m(w).time,"onUpdate:modelValue":l[1]||(l[1]=e=>m(w).time=e)},null,8,["modelValue"]),p(S,{prop:"unit"},{default:r(()=>[p(A,{class:"ml-[1rem] !w-[8rem]",modelValue:m(w).unit,"onUpdate:modelValue":l[2]||(l[2]=e=>m(w).unit=e),placeholder:"请选择"},{default:r(()=>[(o(!0),i(c,null,_(m(U),e=>(o(),d(q,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1})],512),[[f,m(w).status]]),u(p(S,{class:"!pt-[1.6rem]",label:" "},{default:r(()=>[p(D,{type:"primary",onClick:m(C)},{default:r(()=>l[3]||(l[3]=[b("保存",-1)])),_:1,__:[3]},8,["onClick"])]),_:1},512),[[f,m(w).status]]),p(E),p(D,{type:"default",onClick:m(F)},{default:r(()=>l[4]||(l[4]=[b("清理缓存",-1)])),_:1,__:[4]},8,["onClick"])]),_:1},8,["model","rules","disabled"])),[[M,m(g)]]),n("div",R,[p(L,{options:m(G)},null,8,["options"])])])})});export{S as default};
