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