import{d as e,r as o,x as r,$ as t,e as i,G as s,H as a}from"./main-D8Z-8iPZ.js";import{u as d}from"./index-C6fPintp.js";import{u as p}from"./index-yiIyVSv0.js";import{N as n}from"./index-BLjn2Hdc.js";import{r as l}from"./verify-C4A8sgpW.js";import"./index-4SW2EnHr.js";import"./test-DbYqM2ZR.js";import"./useStore-CFVnCatL.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 u=e({name:"NotifyNodeDrawer",props:{node:{type:Object,default:()=>({id:"",config:{provider:"",provider_id:"",subject:"",body:""}})}},setup(e){const{updateNodeConfig:u,isRefreshNode:m}=d(),{useFormInput:c,useFormTextarea:v,useFormCustom:j}=r(),{confirm:f}=a(),{handleError:_}=p(),x=o(Object.keys(e.node.config).length>0?e.node.config:{provider:"",provider_id:"",subject:"",body:""}),y=[c(t("t_0_1745920566646"),"subject",{placeholder:t("t_3_1745887835089")}),v(t("t_1_1745920567200"),"body",{placeholder:t("t_4_1745887835265"),rows:4}),j((()=>i(n,{path:"provider_id",value:x.value.provider_id,isAddMode:!0,"onUpdate:value":e=>{x.value.provider_id=e.value,x.value.provider=e.type}},null)))],{component:b,data:g,example:h}=s({defaultValue:x,config:y,rules:l});return f((async o=>{var r;try{await(null==(r=h.value)?void 0:r.validate()),u(e.node.id,g.value),m.value=e.node.id,o()}catch(t){_(t)}})),()=>i("div",{class:"notify-node-drawer"},[i(b,{labelPlacement:"top"},null)])}});export{u as default};
