import{a}from"./index.js?v=1753954525509";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{c as l}from"./page_layout.js?v=1753954525509";import{d as t}from"./public.js?v=1753954525509";import{a9 as e,aa as i,ab as o}from"./mail2.js?v=1753954525509";import{cG as n,aq as p,av as u,cA as c,ay as r}from"./naive.js?v=1753954525509";import{k as m,P as d,e as _,r as f,U as x,V as v,W as b,Q as h,a2 as M,a3 as j,X as y,j as C}from"./vue.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";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=m({__name:"unsubscribe",emits:["close"],setup(m,{expose:D,emit:U}){const B=U,{t:q}=d(),A=_({http:"https://",url:""}),G=f(""),H=f([{label:"http://",value:"http://"},{label:"https://",value:"https://"}]),O=a=>{const{clipboardData:s}=a;if(s){const a=s.getData("text");if(a)if(-1===a.indexOf("://"))console.log(1),A.url=a;else{const s=a.split("://")[0]+"://";A.http=s,A.url=a.replace(s,"")}}a.preventDefault()},Q=async()=>{t({title:q("Mail.Mass.index_59"),content:q("Mail.Mass.index_60"),onConfirm:async()=>{await e(),V()}})},V=async()=>{const{message:a}=await i();if(l(a)){if(G.value=a.panel_url,G.value){const a=G.value.split("://")[0]+"://";A.http=a}if(a.url){const s=a.url.split("://")[0]+"://";A.http=s,A.url=a.url.replace(s,"")}}},W=()=>{B("close")},X=async()=>{await o({url:A.http+A.url}),B("close")};return V(),D({onConfirm:X}),(l,t)=>{const e=n,i=p,o=u,m=c,d=s,_=r,f=a;return x(),v("div",null,[b("div",$,[h(d,{model:y(A),"label-width":"auto"},{default:M((()=>[b("div",g,j(l.$t("Mail.Mass.index_55"))+j(y(G)||"--"),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(m,{label:l.$t("Mail.Mass.index_58"),path:"url"},{default:M((()=>[b("div",z,[h(o,null,{default:M((()=>[h(e,{value:y(A).http,"onUpdate:value":t[0]||(t[0]=a=>y(A).http=a),style:{width:"90px"},options:y(H)},null,8,["value","options"]),h(i,{value:y(A).url,"onUpdate:value":t[1]||(t[1]=a=>y(A).url=a),class:"flex-1",placeholder:"",onPaste:O},null,8,["value"])])),_:1})])])),_:1},8,["label"])])),_:1},8,["model"])]),h(f,null,{default:M((()=>[h(_,{size:"small",onClick:Q},{default:M((()=>[C(j(l.$t("Mail.Mass.index_59")),1)])),_:1}),h(_,{class:"cancel-btn",size:"small",color:"#cbcbcb",onClick:W},{default:M((()=>[C(j(l.$t("Public.Btn.Cancel")),1)])),_:1}),h(_,{type:"primary",size:"small",onClick:X},{default:M((()=>[C(j(l.$t("Public.Btn.Confirm")),1)])),_:1})])),_:1})])}}});export{D as default};
