import{d as e,r as a,w as t,x as o,$ as s,e as r,bM as d,z as i,G as l,H as n}from"./main-D8Z-8iPZ.js";import{u as p}from"./index-C6fPintp.js";import{r as m}from"./verify-DT_aKhVd.js";import{D as u}from"./index-CQ0Tngw6.js";import"./index-4SW2EnHr.js";import"./index-yiIyVSv0.js";import"./test-DbYqM2ZR.js";import"./useStore-CFVnCatL.js";import"./business-DN2MKo6G.js";import"./useStore-CEiyUWBM.js";import"./setting-BuW_WiRV.js";import"./index-Cc_zz0Ev.js";import"./index-BMspkLA9.js";import"./access-DymwmDzp.js";import"./text-BWsiCV4g.js";const c=e({name:"ApplyNodeDrawer",props:{node:{type:Object,default:()=>({id:"",config:{}})}},setup(e){const{updateNodeConfig:c,isRefreshNode:v}=p(),{confirm:_}=n(),{useFormInput:j}=o(),f=a(Object.keys(e.node.config).length>0?e.node.config:{domains:"",email:"",provider_id:"",provider:"",end_day:30}),y=t((()=>[j(s("t_17_1745227838561"),"domains",{placeholder:s("t_0_1745735774005")}),j(s("t_1_1745735764953"),"email",{placeholder:s("t_2_1745735773668")}),{type:"custom",render:()=>r(u,{type:"dns",path:"provider_id",value:f.value.provider_id,"onUpdate:value":e=>{f.value.provider_id=e.value,f.value.provider=e.type}},null)},{type:"custom",render:()=>r(i,{label:s("t_5_1745735769112"),path:"end_day"},{default:()=>[r(d,{value:f.value.end_day,"onUpdate:value":e=>f.value.end_day=e,showButton:!1,min:1,class:"w-[180px]",placeholder:s("t_6_1745735765205")},null),r("span",{class:"text-[1.4rem] ml-[1.2rem]"},[s("t_7_1745735768326")])]})}])),{component:x,data:h,example:g}=l({defaultValue:f,config:y,rules:m});return _((async a=>{var t;try{await(null==(t=g.value)?void 0:t.validate()),c(e.node.id,h.value),v.value=e.node.id,a()}catch(o){}})),()=>r("div",{class:"apply-node-drawer"},[r(x,{labelPlacement:"top"},null)])}});export{c as default};
