import{a}from"./index.js?v=1763625242172";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{c as l}from"./page_layout.js?v=1763625242172";import{a as t}from"./public.js?v=1763625242172";import{a9 as e,aa as i,ab as o}from"./mail.js?v=1763625242172";import{dV as n,au as p,az as u,dP as r,aC as c}from"./naive.js?v=1763625242172";import{k as d,P as m,e as _,r as f,R as x,S as v,U as b,X as h,a3 as M,a4 as j,V as y,j as C}from"./vue.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const $={class:"px-20px pt-24px pb-8px"},g={class:"mb-20px"},w={class:"mb-20px text-desc"},P={class:"mb-6px"},k={class:"leading-18px"},z={class:"w-260px"},D=d({__name:"unsubscribe",emits:["close"],setup(d,{expose:D,emit:U}){const B=U,{t:V}=m(),H=_({http:"https://",url:""}),O=f(""),R=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),H.url=a;else{const s=a.split("://")[0]+"://";H.http=s,H.url=a.replace(s,"")}}a.preventDefault()},X=async()=>{t({title:V("Mail.Mass.index_59"),content:V("Mail.Mass.index_60"),onConfirm:async()=>{await e(),q()}})},q=async()=>{const{message:a}=await i();if(l(a)){if(O.value=a.panel_url,O.value){const a=O.value.split("://")[0]+"://";H.http=a}if(a.url){const s=a.url.split("://")[0]+"://";H.http=s,H.url=a.url.replace(s,"")}}},A=()=>{B("close")},E=async()=>{await o({url:H.http+H.url}),B("close")};return q(),D({onConfirm:E}),(l,t)=>{const e=n,i=p,o=u,d=r,m=s,_=c,f=a;return x(),v("div",null,[b("div",$,[h(m,{model:y(H),"label-width":"auto"},{default:M((()=>[b("div",g,j(l.$t("Mail.Mass.index_55"))+j(y(O)||"--"),1),b("div",w,[b("div",P,j(l.$t("Mail.Mass.index_56")),1),b("div",k,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(H).http,"onUpdate:value":t[0]||(t[0]=a=>y(H).http=a),style:{width:"90px"},options:y(R)},null,8,["value","options"]),h(i,{value:y(H).url,"onUpdate:value":t[1]||(t[1]=a=>y(H).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:X},{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};
