import{w as j,i as B,v as D,x as N}from"./index-BTglIPU2.js?v=1773287522785";import{_ as R}from"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import{_ as S}from"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import{_ as T}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{V}from"./campaign-CYIboXPk.js?v=1773287522785";import{u as F}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{k as x,R as k,e as O,$ as f,a8 as y,a9 as s,a0 as n,S as e,t as P,c as A,Z as w,j as p,aa as _,F as E,P as G,_ as I}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{aj as L,k as Z,o as q,ak as H}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";const J=x({__name:"index",props:{data:{}},setup(g){const M=g,{t:u}=k(),{id:$}=M.data,d=O({p:1,size:10}),{table:i,columns:t}=F([{key:"recipient",title:u("Config.Alarm.index_3")},{key:"created",title:u("Mail.Unsubscribe.index_24"),align:"right",render:r=>j(r.created)}]),l=async()=>{try{i.loading=!0;const{message:r}=await V({task_id:$,...d});B(r)&&(i.data=r.data,i.total=r.total)}finally{i.loading=!1}};return l(),(r,c)=>{const h=T,a=S,m=R;return f(),y(m,{class:"p-16px"},{table:s(()=>[n(h,{loading:e(i).loading,"loading-num":3,data:e(i).data,columns:e(t)},null,8,["loading","data","columns"])]),pageRight:s(()=>[n(a,{page:e(d).p,"onUpdate:page":c[0]||(c[0]=o=>e(d).p=o),"page-size":e(d).size,"onUpdate:pageSize":c[1]||(c[1]=o=>e(d).size=o),"item-count":e(i).total,onRefresh:l},null,8,["page","page-size","item-count"])]),_:1})}}}),K={class:"p-20px"},ie=x({__name:"index",props:{row:{}},emits:["add"],setup(g,{expose:M,emit:u}){const $=g,{t:d}=k(),i=u,t=P($,"row"),l=D(""),r=()=>{l.data.id=t.value.id,l.title="".concat(d("Mail.Unsubscribe.index_25")," [").concat(t.value.subject,"]"),l.show=!0},c=A(()=>t.value.mail_type.map(a=>Object.values(a)[0]));return M({onConfirm:()=>{i("add",t.value)}}),(a,m)=>{const o=L,v=q,U=Z,z=H,C=N;return f(),w("div",K,[n(z,{"label-placement":"left",bordered:!0,column:1,"label-style":{width:"180px"}},{default:s(()=>[n(o,{label:"Display Name"},{default:s(()=>[p(_(e(t).full_name),1)]),_:1}),n(o,{label:a.$t("Mail.Mass.index_4")},{default:s(()=>[p(_(e(t).addresser),1)]),_:1},8,["label"]),n(o,{label:a.$t("Mail.Mass.index_23")},{default:s(()=>[p(_(e(t).subject),1)]),_:1},8,["label"]),n(o,{label:a.$t("Mail.Mass.index_30")},{default:s(()=>[p(_(e(t).is_record===1?a.$t("Mail.Mass.index_64"):a.$t("Mail.Mass.index_65")),1)]),_:1},8,["label"]),n(o,{label:"Groups"},{default:s(()=>[n(U,null,{default:s(()=>[(f(!0),w(E,null,G(e(c),b=>(f(),y(v,{key:b,size:"small"},{default:s(()=>[p(_(b),1)]),_:2},1024))),128))]),_:1})]),_:1}),n(o,{label:a.$t("Mail.Unsubscribe.index_25")},{default:s(()=>[I("span",{class:"bt-link",onClick:r},_(a.$t("Public.Btn.Click")),1)]),_:1},8,["label"]),n(o,{label:a.$t("Mail.Mass.index_31")},{default:s(()=>[p(_(e(t).unsubscribe===1?a.$t("Mail.Mass.index_64"):a.$t("Mail.Mass.index_65")),1)]),_:1},8,["label"]),n(o,{label:a.$t("Mail.Mass.index_33")},{default:s(()=>[p(_(e(t).threads===0?a.$t("Mail.Mass.index_34"):e(t).threads),1)]),_:1},8,["label"])]),_:1}),n(C,{show:e(l).show,"onUpdate:show":m[0]||(m[0]=b=>e(l).show=b),title:e(l).title,data:e(l).data,width:550,"min-height":280,component:J},null,8,["show","title","data"])])}}});export{ie as default};
