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-DVBEmEFd.js";import{u as p}from"./index-BUF9qwGu.js";import{r as m}from"./verify-DI2j_NNA.js";import{D as u}from"./index-B5g5r0x_.js";import"./index-CBR7zAef.js";import"./index-sztGZ9nB.js";import"./test-BVQgoLgN.js";import"./useStore-BwTk8hfc.js";import"./business-BI7cIbpG.js";import"./useStore-9ut3oD1M.js";import"./setting-DqvEYlnM.js";import"./index-D0u98Vm2.js";import"./index-pbEXObG7.js";import"./access-DqTnWAGY.js";import"./text-BBOsWGWM.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};
