import{d as e,r as o,m as r,$ as t,c as a,x as i,y as s}from"./main-DKqTMGci.js";import{u as d,k as n}from"./index-DffoH-R8.js";import{u as p}from"./index-DoBLtCBk.js";import{N as u}from"./index-BR6XzYWc.js";import{r as l}from"./verify-B43ktUsL.js";import"./index-K1QYmvkf.js";import"./test-BLZVy0JC.js";import"./useStore-fO20gUdJ.js";import"./useStore-BxWZ-2Xk.js";import"./setting-huTIIu1c.js";import"./index-CpnxPwGt.js";import"./index-ClL52y7R.js";import"./Flex-CfuRT3n6.js";import"./text-CBxeXF61.js";const m=e({name:"NotifyNodeDrawer",props:{node:{type:Object,default:()=>({id:"",config:{provider:"",provider_id:"",subject:"",body:""}})}},setup(e){const{updateNodeConfig:m,isRefreshNode:v}=d(),{useFormInput:c,useFormTextarea:j,useFormCustom:f}=r(),{confirm:x}=s(),{handleError:y}=p(),_=o(n(e.node.config)),b=[c(t("t_0_1745920566646"),"subject",{placeholder:t("t_3_1745887835089"),onInput:e=>_.value.subject=e.trim()}),j(t("t_1_1745920567200"),"body",{placeholder:t("t_4_1745887835265"),rows:4,onInput:e=>_.value.body=e.trim()}),f((()=>a(u,{path:"provider_id",value:_.value.provider_id,isAddMode:!0,"onUpdate:value":e=>{_.value.provider_id=e.value,_.value.provider=e.type}},null)))],{component:h,data:g,example:N}=i({defaultValue:_,config:b,rules:l});return x((async o=>{var r;try{await(null==(r=N.value)?void 0:r.validate()),m(e.node.id,g.value),v.value=e.node.id,o()}catch(t){y(t)}})),()=>a("div",{class:"notify-node-drawer"},[a(h,{labelPlacement:"top"},null)])}});export{m as default};
