import{a}from"./index.js?v=1764233927359";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{d as l}from"./page_layout.js?v=1764233927359";import{a as t}from"./public.js?v=1764233927359";import{a9 as e,aa as i,ab as o}from"./mail.js?v=1764233927359";import{dR as n,av as p,dV as u,au as r,aC as c}from"./naive.js?v=1764233927359";import{k as d,P as m,e as _,r as f,R as x,V as v,S as b,W as h,a3 as M,a4 as j,U as y,j as C}from"./vue.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";const $={class:"px-20px pt-24px pb-8px"},g={class:"mb-20px"},w={class:"mb-20px text-desc"},k={class:"mb-6px"},P={class:"leading-18px"},z={class:"w-260px"},D=d({__name:"unsubscribe",emits:["close"],setup(d,{expose:D,emit:U}){const B=U,{t:R}=m(),V=_({http:"https://",url:""}),H=f(""),O=f([{label:"http://",value:"http://"},{label:"https://",value:"https://"}]),S=a=>{const{clipboardData:s}=a;if(s){const a=s.getData("text");if(a)if(-1===a.indexOf("://"))console.log(1),V.url=a;else{const s=a.split("://")[0]+"://";V.http=s,V.url=a.replace(s,"")}}a.preventDefault()},W=async()=>{t({title:R("Mail.Mass.index_59"),content:R("Mail.Mass.index_60"),onConfirm:async()=>{await e(),q()}})},q=async()=>{const{message:a}=await i();if(l(a)){if(H.value=a.panel_url,H.value){const a=H.value.split("://")[0]+"://";V.http=a}if(a.url){const s=a.url.split("://")[0]+"://";V.http=s,V.url=a.url.replace(s,"")}}},A=()=>{B("close")},E=async()=>{await o({url:V.http+V.url}),B("close")};return q(),D({onConfirm:E}),(l,t)=>{const e=u,i=r,o=p,d=n,m=s,_=c,f=a;return v(),x("div",null,[b("div",$,[h(m,{model:y(V),"label-width":"auto"},{default:M(()=>[b("div",g,j(l.$t("Mail.Mass.index_55"))+j(y(H)||"--"),1),b("div",w,[b("div",k,j(l.$t("Mail.Mass.index_56")),1),b("div",P,j(l.$t("Mail.Mass.index_57")),1)]),h(d,{label:l.$t("Mail.Mass.index_58"),path:"url"},{default:M(()=>[b("div",z,[h(o,null,{default:M(()=>[h(e,{value:y(V).http,"onUpdate:value":t[0]||(t[0]=a=>y(V).http=a),style:{width:"90px"},options:y(O)},null,8,["value","options"]),h(i,{value:y(V).url,"onUpdate:value":t[1]||(t[1]=a=>y(V).url=a),class:"flex-1",placeholder:"",onPaste:S},null,8,["value"])]),_:1})])]),_:1},8,["label"])]),_:1},8,["model"])]),h(f,null,{default:M(()=>[h(_,{size:"small",onClick:W},{default:M(()=>[C(j(l.$t("Mail.Mass.index_59")),1)]),_:1}),h(_,{class:"cancel-btn",size:"small",color:"#cbcbcb",onClick:A},{default:M(()=>[C(j(l.$t("Public.Btn.Cancel")),1)]),_:1}),h(_,{type:"primary",size:"small",onClick:E},{default:M(()=>[C(j(l.$t("Public.Btn.Confirm")),1)]),_:1})]),_:1})])}}});export{D as default};
