import{_ as e}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{ap as a,aq as l}from"./mail.js?v=1763625242172";import{k as r,P as s,r as t,e as u,R as i,S as d,X as o,a3 as p,U as c,V as n,N as _}from"./vue.js?v=1763625242172";import{au as v,dP as f,dV as m,dj as w}from"./naive.js?v=1763625242172";import"./page_layout.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./public.js?v=1763625242172";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),P=u({user:"",forward_user:"",type:"sender",active:1}),R=[{label:E("Mail.Bcc.index_2"),value:"sender"},{label:E("Mail.Bcc.index_3"),value:"recipient"}],V={};return(()=>{const{row:e,isEdit:a}=M;a&&e&&(P.user=e.user,P.forward_user=e.forward_user,P.type=e.type,P.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:P.type,forward_user_new:P.forward_user,active_new:P.active}):await l(_(P)),k("refresh")}}),(a,l)=>{const r=v,s=f,t=m,u=w,_=e;return i(),d("div",x,[o(_,{ref_key:"formRef",ref:g,model:n(P),rules:V},{default:p((()=>[o(s,{label:a.$t("Mail.Bcc.index_4"),path:"user"},{default:p((()=>[c("div",y,[o(r,{value:n(P).user,"onUpdate:value":l[0]||(l[0]=e=>n(P).user=e),disabled:n(U),placeholder:a.$t("Mail.Bcc.index_11")},null,8,["value","disabled","placeholder"])])])),_:1},8,["label"]),o(s,{label:a.$t("Mail.Bcc.index_5"),path:"forward_user"},{default:p((()=>[c("div",b,[o(r,{value:n(P).forward_user,"onUpdate:value":l[1]||(l[1]=e=>n(P).forward_user=e),placeholder:a.$t("Mail.Bcc.index_12")},null,8,["value","placeholder"])])])),_:1},8,["label"]),o(s,{label:a.$t("Mail.Bcc.index_7"),path:"type"},{default:p((()=>[c("div",h,[o(t,{value:n(P).type,"onUpdate:value":l[2]||(l[2]=e=>n(P).type=e),options:R},null,8,["value"])])])),_:1},8,["label"]),o(s,{label:"Active","show-feedback":!1},{default:p((()=>[o(u,{value:n(P).active,"onUpdate:value":l[3]||(l[3]=e=>n(P).active=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1})])),_:1},8,["model"])])}}});export{j as default};
