import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{_ as e}from"./index99.js?v=1763625242172";import{X as l,ar as r}from"./mail.js?v=1763625242172";import{k as s,r as o,e as d,R as i,S as t,X as u,a3 as n,V as p,U as _,a2 as v,an as c,N as m}from"./vue.js?v=1763625242172";import{dj as f,dP as w,au as x}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 b={class:"p-20px pb-32px"},h={class:"w-300px"},j={class:"w-300px"},$={class:"w-300px"},k=s({__name:"index",props:{row:{},isEdit:{type:Boolean}},emits:["refresh"],setup(s,{expose:k,emit:y}){const F=s,M=y,{isEdit:U}=F,g=o(null),E=d({user:"",domain:"",forward_user:"",active:1}),P={};return(()=>{const{row:a,isEdit:e}=F;e&&a&&(E.active=a.active,E.user=a.address,E.domain=a.domain,E.forward_user=a.goto)})(),k({onConfirm:async()=>{var a;await(null==(a=g.value)?void 0:a.validate()),U?await l({user:E.user,forward_user:E.forward_user,active:E.active}):await r(m(E)),M("refresh")}}),(l,r)=>{const s=f,o=w,d=x,m=e,k=a;return i(),t("div",b,[u(k,{ref_key:"formRef",ref:g,model:p(E),rules:P},{default:n((()=>[u(o,{label:l.$t("Public.Table.Status")},{default:n((()=>[u(s,{value:p(E).active,"onUpdate:value":r[0]||(r[0]=a=>p(E).active=a),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1},8,["label"]),u(o,{label:l.$t("Mail.Forward.index_10"),path:"user"},{default:n((()=>[_("div",h,[u(d,{value:p(E).user,"onUpdate:value":r[1]||(r[1]=a=>p(E).user=a),disabled:p(U),placeholder:l.$t("Mail.Forward.index_11")},null,8,["value","disabled","placeholder"])])])),_:1},8,["label"]),p(U)?c("",!0):(i(),v(o,{key:0,label:l.$t("Mail.Forward.index_4"),path:"domain"},{default:n((()=>[_("div",j,[u(d,{value:p(E).domain,"onUpdate:value":r[2]||(r[2]=a=>p(E).domain=a),placeholder:l.$t("Mail.Forward.index_12")},null,8,["value","placeholder"])])])),_:1},8,["label"])),u(o,{label:l.$t("Mail.Forward.index_13"),path:"forward_user","show-feedback":!1},{default:n((()=>[_("div",$,[u(m,{value:p(E).forward_user,"onUpdate:value":r[3]||(r[3]=a=>p(E).forward_user=a),rows:3,placeholder:l.$t("Mail.Forward.index_14")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}});export{k as default};
