import{_ as a}from"./public.js?v=1763625242172";import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{n as t}from"./page_layout.js?v=1763625242172";import{m as s,a as l}from"./config3.js?v=1763625242172";import{d5 as o,au as n,dY as u,az as i,dP as p,df as d}from"./naive.js?v=1763625242172";import{k as _,e as m,r,R as c,S as f,X as x,a3 as v,U as b,V as j,j as z,a4 as w,an as y}from"./vue.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const C={class:"px-20px py-24px"},Q={class:"w-160px"},$={class:"w-160px"},h={class:"text-error"},g={key:0},q=_({__name:"quota-config",props:{data:{}},setup(_,{expose:q}){const k=_,{type:U,info:B,callback:M}=k.data,H=m({used:"0",size:0}),P=r("MB");return(()=>{const a=o(B,"quota.used",0);if(a>0){const e=t(a).split(" ");H.used=e[0],P.value=e[1]}H.size=o(B,"quota.size",0)})(),q({onConfirm:async({hide:a})=>{"site"!==U&&"ftp"!==U||await s({size:H.size,quota_type:U,path:o(B,"path","")}),"database"===U&&await l({size:H.size,db_name:o(B,"name","")}),null==M||M(),a()}}),(t,s)=>{const l=n,o=u,_=i,m=p,r=d,q=e,k=a;return c(),f("div",C,[x(q,{"label-width":"180"},{default:v((()=>[x(m,{label:t.$t("Component.Quota.index_6")},{default:v((()=>[b("div",Q,[x(_,null,{default:v((()=>[x(l,{value:j(H).used,"onUpdate:value":s[0]||(s[0]=a=>j(H).used=a),disabled:!0},null,8,["value"]),x(o,{class:"w-44px text-center"},{default:v((()=>[z(w(j(P)),1)])),_:1})])),_:1})])])),_:1},8,["label"]),x(m,{label:t.$t("Component.Quota.index_7")},{default:v((()=>[b("div",$,[x(_,null,{default:v((()=>[x(r,{value:j(H).size,"onUpdate:value":s[1]||(s[1]=a=>j(H).size=a),min:0,"show-button":!1},null,8,["value"]),x(o,{class:"w-44px text-center"},{default:v((()=>s[2]||(s[2]=[z("MB")]))),_:1,__:[2]})])),_:1})])])),_:1},8,["label"])])),_:1}),x(k,{class:"mt-8px"},{default:v((()=>[b("li",h,w(t.$t("Component.Quota.index_8")),1),b("li",null,w(t.$t("Component.Quota.index_9")),1),"database"!==j(U)?(c(),f("li",g,w(t.$t("Component.Quota.index_10")),1)):y("",!0),b("li",null,w(t.$t("Component.Quota.index_11")),1)])),_:1})])}}});export{q as default};
