import{_ as k}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{ar as E,as as g}from"./mail-COTHIXbY.js?v=1773287522785";import{k as R,R as U,r as C,e as N,$ as F,Z as V,a0 as s,a9 as l,_ as c,S as o,N as A}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as I,b as O,a6 as S,a8 as Z}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-BTglIPU2.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const j={class:"p-20px"},q={class:"w-300px"},z={class:"w-300px"},D={class:"w-300px"},T=R({__name:"index",props:{row:{},isEdit:{type:Boolean}},emits:["refresh"],setup(m,{expose:v,emit:w}){const _=m,b=w,{isEdit:d,row:r}=_,{t:u}=U(),p=C(null),e=N({user:"",forward_user:"",type:"sender",active:1}),y=[{label:u("Mail.Bcc.index_2"),value:"sender"},{label:u("Mail.Bcc.index_3"),value:"recipient"}],B={},h=async()=>{var a;await((a=p.value)==null?void 0:a.validate()),d&&r?await E({user:r.user,type:r.type,forward_user:r.forward_user,type_new:e.type,forward_user_new:e.forward_user,active_new:e.active}):await g(A(e)),b("refresh")};return(()=>{const{row:a,isEdit:t}=_;t&&a&&(e.user=a.user,e.forward_user=a.forward_user,e.type=a.type,e.active=a.active)})(),v({onConfirm:h}),(a,t)=>{const f=O,i=I,x=S,M=Z,$=k;return F(),V("div",j,[s($,{ref_key:"formRef",ref:p,model:o(e),rules:B},{default:l(()=>[s(i,{label:a.$t("Mail.Bcc.index_4"),path:"user"},{default:l(()=>[c("div",q,[s(f,{value:o(e).user,"onUpdate:value":t[0]||(t[0]=n=>o(e).user=n),disabled:o(d),placeholder:a.$t("Mail.Bcc.index_11")},null,8,["value","disabled","placeholder"])])]),_:1},8,["label"]),s(i,{label:a.$t("Mail.Bcc.index_5"),path:"forward_user"},{default:l(()=>[c("div",z,[s(f,{value:o(e).forward_user,"onUpdate:value":t[1]||(t[1]=n=>o(e).forward_user=n),placeholder:a.$t("Mail.Bcc.index_12")},null,8,["value","placeholder"])])]),_:1},8,["label"]),s(i,{label:a.$t("Mail.Bcc.index_7"),path:"type"},{default:l(()=>[c("div",D,[s(x,{value:o(e).type,"onUpdate:value":t[2]||(t[2]=n=>o(e).type=n),options:y},null,8,["value"])])]),_:1},8,["label"]),s(i,{label:"Active","show-feedback":!1},{default:l(()=>[s(M,{value:o(e).active,"onUpdate:value":t[3]||(t[3]=n=>o(e).active=n),"checked-value":1,"unchecked-value":0},null,8,["value"])]),_:1})]),_:1},8,["model"])])}}});export{T as default};
