import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{ap as a,aq as l}from"./mail2.js?v=1753954525509";import{k as r,P as s,r as t,e as i,U as u,V as o,Q as d,a2 as p,W as c,X as n,N as _}from"./vue.js?v=1753954525509";import{aq as v,cA as f,cG as m,c5 as w}from"./naive.js?v=1753954525509";import"./page_layout.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./public.js?v=1753954525509";const x={class:"p-20px"},y={class:"w-300px"},b={class:"w-300px"},h={class:"w-300px"},j=r({__name:"index",props:{row:{},isEdit:{type:Boolean}},emits:["refresh"],setup(r,{expose:j,emit:B}){const M=r,k=B,{isEdit:U,row:$}=M,{t:E}=s(),g=t(null),q=i({user:"",forward_user:"",type:"sender",active:1}),A=[{label:E("Mail.Bcc.index_2"),value:"sender"},{label:E("Mail.Bcc.index_3"),value:"recipient"}],C={};return(()=>{const{row:e,isEdit:a}=M;a&&e&&(q.user=e.user,q.forward_user=e.forward_user,q.type=e.type,q.active=e.active)})(),j({onConfirm:async()=>{var e;await(null==(e=g.value)?void 0:e.validate()),U&&$?await a({user:$.user,type:$.type,forward_user:$.forward_user,type_new:q.type,forward_user_new:q.forward_user,active_new:q.active}):await l(_(q)),k("refresh")}}),(a,l)=>{const r=v,s=f,t=m,i=w,_=e;return u(),o("div",x,[d(_,{ref_key:"formRef",ref:g,model:n(q),rules:C},{default:p((()=>[d(s,{label:a.$t("Mail.Bcc.index_4"),path:"user"},{default:p((()=>[c("div",y,[d(r,{value:n(q).user,"onUpdate:value":l[0]||(l[0]=e=>n(q).user=e),disabled:n(U),placeholder:a.$t("Mail.Bcc.index_11")},null,8,["value","disabled","placeholder"])])])),_:1},8,["label"]),d(s,{label:a.$t("Mail.Bcc.index_5"),path:"forward_user"},{default:p((()=>[c("div",b,[d(r,{value:n(q).forward_user,"onUpdate:value":l[1]||(l[1]=e=>n(q).forward_user=e),placeholder:a.$t("Mail.Bcc.index_12")},null,8,["value","placeholder"])])])),_:1},8,["label"]),d(s,{label:a.$t("Mail.Bcc.index_7"),path:"type"},{default:p((()=>[c("div",h,[d(t,{value:n(q).type,"onUpdate:value":l[2]||(l[2]=e=>n(q).type=e),options:A},null,8,["value"])])])),_:1},8,["label"]),d(s,{label:"Active","show-feedback":!1},{default:p((()=>[d(i,{value:n(q).active,"onUpdate:value":l[3]||(l[3]=e=>n(q).active=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1})])),_:1},8,["model"])])}}});export{j as default};
