import{_ as a}from"./index.js?v=1763625242172";import{c as e,h as t,e as s}from"./public.js?v=1763625242172";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1763625242172";import{_ as i}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1763625242172";import{V as n}from"./campaign.js?v=1763625242172";import{a9 as d,c as o,a7 as r,a8 as u}from"./page_layout.js?v=1763625242172";import{k as _,P as p,e as c,R as m,a2 as b,a3 as f,X as x,V as g,t as M,c as h,S as j,j as v,a4 as y,F as $,O as w,U as k}from"./vue.js?v=1763625242172";import{dd as z,d9 as U}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1763625242172";const C=_({__name:"index",props:{data:{}},setup(a){const s=a,{t:r}=p(),{id:u}=s.data,_=c({p:1,size:10}),{table:M,columns:h}=e([{key:"recipient",title:r("Config.Alarm.index_3")},{key:"created",title:r("Mail.Unsubscribe.index_24"),align:"right",render:a=>d(a.created)}]),j=async()=>{try{M.loading=!0;const{message:a}=await n({task_id:u,..._});o(a)&&(M.data=a.data,M.total=a.total)}finally{M.loading=!1}};return j(),(a,e)=>{const s=t,n=i,d=l;return m(),b(d,{class:"p-16px"},{table:f((()=>[x(s,{loading:g(M).loading,"loading-num":3,data:g(M).data,columns:g(h)},null,8,["loading","data","columns"])])),pageRight:f((()=>[x(n,{page:g(_).p,"onUpdate:page":e[0]||(e[0]=a=>g(_).p=a),"page-size":g(_).size,"onUpdate:pageSize":e[1]||(e[1]=a=>g(_).size=a),"item-count":g(M).total,onRefresh:j},null,8,["page","page-size","item-count"])])),_:1})}}}),R={class:"p-20px"},O=_({__name:"index",props:{row:{}},emits:["add"],setup(e,{expose:t,emit:l}){const i=e,{t:n}=p(),d=l,o=M(i,"row"),_=s(""),c=()=>{_.data.id=o.value.id,_.title="".concat(n("Mail.Unsubscribe.index_25")," [").concat(o.value.subject,"]"),_.show=!0},O=h((()=>o.value.mail_type.map((a=>Object.values(a)[0]))));return t({onConfirm:()=>{d("add",o.value)}}),(e,t)=>{const s=r,l=z,i=U,n=u,d=a;return m(),j("div",R,[x(n,{"label-placement":"left",bordered:!0,column:1,"label-style":{width:"180px"}},{default:f((()=>[x(s,{label:"Display Name"},{default:f((()=>[v(y(g(o).full_name),1)])),_:1}),x(s,{label:e.$t("Mail.Mass.index_4")},{default:f((()=>[v(y(g(o).addresser),1)])),_:1},8,["label"]),x(s,{label:e.$t("Mail.Mass.index_23")},{default:f((()=>[v(y(g(o).subject),1)])),_:1},8,["label"]),x(s,{label:e.$t("Mail.Mass.index_30")},{default:f((()=>[v(y(1===g(o).is_record?e.$t("Mail.Mass.index_64"):e.$t("Mail.Mass.index_65")),1)])),_:1},8,["label"]),x(s,{label:"Groups"},{default:f((()=>[x(i,null,{default:f((()=>[(m(!0),j($,null,w(g(O),(a=>(m(),b(l,{key:a,size:"small"},{default:f((()=>[v(y(a),1)])),_:2},1024)))),128))])),_:1})])),_:1}),x(s,{label:e.$t("Mail.Unsubscribe.index_25")},{default:f((()=>[k("span",{class:"bt-link",onClick:c},y(e.$t("Public.Btn.Click")),1)])),_:1},8,["label"]),x(s,{label:e.$t("Mail.Mass.index_31")},{default:f((()=>[v(y(1===g(o).unsubscribe?e.$t("Mail.Mass.index_64"):e.$t("Mail.Mass.index_65")),1)])),_:1},8,["label"]),x(s,{label:e.$t("Mail.Mass.index_33")},{default:f((()=>[v(y(0===g(o).threads?e.$t("Mail.Mass.index_34"):g(o).threads),1)])),_:1},8,["label"])])),_:1}),x(d,{show:g(_).show,"onUpdate:show":t[0]||(t[0]=a=>g(_).show=a),title:g(_).title,data:g(_).data,width:550,"min-height":280,component:C},null,8,["show","title","data"])])}}});export{O as default};
