PageSourceSearch

https://app.sendx.io/_nuxt/Dna8u5Ad.js

js sendx.io collected 2026-09-24 17:13:24 UTC 38,769 bytes, 1 lines download raw bytes

1import{_ as Ue}from"./D76vokZ-.js";import{_ as Ee}from"./CARyyOqM.js";import{a7 as Ve,E as M,r as u,bI as Re,cx as Ge,w as He,a as Xe,bP as Ye,y as d,z as i,D as e,J as v,bA as b,u as o,X as m,A as f,C as g,O as l,N as j,R as qe,G as S,H as ne,bC as X,bN as U,co as Je,bB as We,L as Ke,I as Qe,T as Ze,bi as p}from"./DcOrGnEZ.js";import{d as et}from"./Cq3WtMsU.js";import{u as tt}from"./Bq0I1HAY.js";import{A as Y,g as ge,a as _e,B as st}from"./Bp4qpb_w.js";import{P as we}from"./COKa_Hdn.js";import"./NzDD4QcG.js";import"./BJIomEi9.js";import"./Op4w2AQ-.js";import"./BpFprnO2.js";import"./Bku5b180.js";import"./CkBK5Pv9.js";const nt={class:"flex flex-col gap-6"},ot=e("div",null,[e("h2",{class:"text-[15px] font-semibold text-sendx-text-primary"},"Pricing Plans"),e("p",{class:"text-xs text-sendx-text-secondary mt-0.5"}," Define contact slab pricing and addon pricing for your sub-accounts ")],-1),rt={key:0,class:"rounded-lg border border-yellow-500/30 bg-yellow-500/5 p-4 flex items-start gap-3"},at=e("svg",{class:"h-5 w-5 text-yellow-500 shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})],-1),it=e("p",{class:"text-sm font-medium text-yellow-500"},"Payment gateway not connected",-1),dt={class:"text-xs text-sendx-text-secondary mt-0.5"},lt={class:"rounded-lg border border-sendx-border-primary bg-sendx-primary"},ct={class:"px-4 py-3 border-b border-sendx-border-primary flex items-center justify-between"},ut=e("div",null,[e("h3",{class:"text-sm font-semibold text-sendx-text-primary"},"Contact plans"),e("p",{class:"text-[11px] text-sendx-text-secondary mt-0.5"},"Subscription plans based on contact limits. Drag rows to reorder.")],-1),xt={class:"overflow-x-auto"},pt={class:"w-full"},mt=e("thead",null,[e("tr",{class:"border-b border-sendx-border-primary"},[e("th",{class:"w-8 px-2 py-3"}),e("th",{class:"text-left px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Plan"),e("th",{class:"text-right px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Contacts"),e("th",{class:"text-right px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Price"),e("th",{class:"text-center px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Interval"),e("th",{class:"text-center px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Status"),e("th",{class:"text-right px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Actions")])],-1),vt={class:"border-b border-sendx-border-primary last:border-0"},yt=e("td",{class:"px-2 py-3"},[e("div",{class:"drag-handle cursor-grab flex items-center justify-center text-sendx-text-secondary hover:text-sendx-text-primary"},[e("svg",{class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 8h16M4 16h16"})])])],-1),ht={class:"px-4 py-3"},bt={class:"flex items-center gap-2"},ft={class:"text-sm font-medium text-sendx-text-primary"},gt={key:0,class:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium bg-yellow-500/15 text-yellow-400 border border-yellow-500/20"},_t={key:1,class:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium bg-indigo-500/15 text-indigo-400 border border-indigo-500/20"},wt={key:0,class:"text-xs text-sendx-text-secondary mt-0.5"},kt={class:"px-4 py-3 text-right"},Ct={class:"text-sm text-sendx-text-primary"},At={class:"px-4 py-3 text-right"},It={class:"text-sm font-medium text-sendx-text-primary"},Pt={class:"px-4 py-3 text-center"},Mt={class:"text-xs text-sendx-text-secondary capitalize"},Dt={class:"px-4 py-3 text-center"},Bt={class:"px-4 py-3 text-right"},jt={class:"flex items-center justify-end gap-1"},St=["onClick"],$t=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1),Ft=[$t],Lt=["onClick"],zt=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})],-1),Ot=[zt],Tt=["onClick"],Nt=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Ut=[Nt],Et=["onClick"],Vt=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),Rt=[Vt],Gt={key:0},Ht=e("tr",null,[e("td",{colspan:"7",class:"px-4 py-12 text-center"},[e("svg",{class:"mx-auto h-10 w-10 text-sendx-text-secondary/50 mb
1-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 6h.008v.008H6V6z"})]),e("p",{class:"text-sm text-sendx-text-secondary"},"No contact plans yet"),e("p",{class:"text-xs text-sendx-text-secondary mt-1"},"Create your first plan to start billing sub-accounts")])],-1),Xt=[Ht],Yt={class:"rounded-lg border border-sendx-border-primary bg-sendx-primary"},qt={class:"px-4 py-3 border-b border-sendx-border-primary flex items-center justify-between"},Jt=e("div",null,[e("h3",{class:"text-sm font-semibold text-sendx-text-primary"},"Addon pricing"),e("p",{class:"text-[11px] text-sendx-text-secondary mt-0.5"},"Set custom prices for addons your sub-accounts can purchase")],-1),Wt={class:"overflow-x-auto"},Kt={class:"w-full"},Qt=e("thead",null,[e("tr",{class:"border-b border-sendx-border-primary"},[e("th",{class:"text-left px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Addon"),e("th",{class:"text-right px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Price"),e("th",{class:"text-center px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Interval"),e("th",{class:"text-center px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Status"),e("th",{class:"text-right px-4 py-3 text-[11px] font-medium text-sendx-text-secondary uppercase tracking-wider"},"Actions")])],-1),Zt={class:"px-4 py-3"},es={class:"flex items-center gap-2"},ts={class:"text-sm font-medium text-sendx-text-primary"},ss={key:0,class:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium bg-indigo-500/15 text-indigo-400 border border-indigo-500/20"},ns={key:0,class:"text-xs text-sendx-text-secondary mt-0.5"},os={class:"px-4 py-3 text-right"},rs={class:"text-sm font-medium text-sendx-text-primary"},as={key:0,class:"block text-xs text-sendx-text-secondary"},is={class:"px-4 py-3 text-center"},ds={class:"text-xs text-sendx-text-secondary capitalize"},ls={class:"px-4 py-3 text-center"},cs={class:"px-4 py-3 text-right"},us={class:"flex items-center justify-end gap-1"},xs=["onClick"],ps=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1),ms=[ps],vs=["onClick"],ys=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})],-1),hs=[ys],bs=["onClick"],fs=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),gs=[fs],_s=["onClick"],ws=e("svg",{class:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),ks=[ws],Cs={key:0},As=e("td",{colspan:"6",class:"px-4 py-12 text-center"},[e("svg",{class:"mx-auto h-10 w-10 text-sendx-text-secondary/50 mb-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1.5"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})]),e("p",{class:"text-sm text-sendx-text-secondary"},"No addon pricing yet"),e("p",{class:"text-xs text-sendx-text-secondary mt-1"},"Add pricing for addons your sub-accounts can purchase")],-1),Is=[As],Ps={class:"fixed inset-0 z-50 flex items-center justify-center"},Ms={class:"relative w-full max-w-lg mx-4 rounded-lg bg-sendx-card shadow-xl border border-sendx-border-primary"},Ds={class:"px-6 py-4 border-b border-sendx-border-primary"},Bs={class:"text-sm font-semibold text-sendx-text-primary"},js={class:"px-6 py-5 space-y-4 max-h-[70vh] overflow-y-auto"},Ss=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Plan name",-1),$s=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Description",-1),Fs=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Contact limit",-1),Ls={class:"grid grid-cols-2 gap-3"},zs=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Price (USD)",-1),Os={class:"relative"},Ts=e("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-sendx-text-secondary"},"$",-1),Ns=["value"],Us={key:0,class:"mt-1 text-[11px] text-sendx-text-secondary"},Es=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Billing interval",-1),Vs=e("option",{value:"month"},"Monthly",-1),Rs=e("option",{value:"year"},"Yearly",-1),Gs=[Vs,Rs],Hs={class:"flex items-end pb-1"},Xs={class:"flex items-center gap-2 cursor-pointer"},Ys=e("span",{class:"text-xs text-sendx-text-primary"}
1,"Mark as popular",-1),qs={class:"px-6 py-4 border-t border-sendx-border-primary flex items-center justify-end gap-3"},Js={class:"fixed inset-0 z-50 flex items-center justify-center"},Ws={class:"relative w-full max-w-lg mx-4 rounded-lg bg-sendx-card shadow-xl border border-sendx-border-primary"},Ks={class:"px-6 py-4 border-b border-sendx-border-primary"},Qs={class:"text-sm font-semibold text-sendx-text-primary"},Zs={class:"px-6 py-5 space-y-4 max-h-[70vh] overflow-y-auto"},en=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Addon",-1),tn={class:"relative"},sn=e("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[e("svg",{class:"h-5 w-5 text-sendx-text-secondary",viewBox:"0 0 20 20",fill:"currentColor"},[e("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1),nn={key:0,class:"absolute z-50 mt-1 w-full bg-sendx-card shadow-lg max-h-64 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto overscroll-contain focus:outline-none sm:text-sm"},on=["onClick"],rn={class:"block truncate"},an={key:0,class:"text-sendx-text-secondary"},dn={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-4 text-sendx-text-light"},ln=e("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1),cn=[ln],un={key:0,class:"rounded-md border border-sendx-border-primary bg-sendx-secondary p-3"},xn={class:"flex items-center gap-2 mb-1"},pn={class:"inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium bg-sendx-secondary text-sendx-text-secondary border border-sendx-border-primary"},mn={class:"text-[11px] text-sendx-text-secondary"},vn={class:"text-[11px] text-sendx-text-secondary"},yn=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Display name",-1),hn=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Description",-1),bn={class:"block text-xs font-medium text-sendx-text-primary mb-1"},fn={class:"relative"},gn=e("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-sendx-text-secondary"},"$",-1),_n=["value"],wn={key:0,class:"mt-1 text-[11px] text-sendx-text-secondary"},kn={key:0},Cn=e("label",{class:"block text-xs font-medium text-sendx-text-primary mb-1"},"Billing interval",-1),An={class:"block truncate"},In=e("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[e("svg",{class:"h-5 w-5 text-sendx-text-secondary",viewBox:"0 0 20 20",fill:"currentColor"},[e("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1),Pn=["onClick"],Mn={class:"block truncate"},Dn={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-4 text-sendx-text-light"},Bn=e("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1),jn=[Bn],Sn={key:1},$n={class:"block text-xs font-medium text-sendx-text-primary mb-1"},Fn={class:"relative"},Ln=e("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-sendx-text-secondary"},"$",-1),zn=["value","placeholder"],On={class:"mt-1 text-[11px] text-sendx-text-secondary"},Tn={class:"px-6 py-4 border-t border-sendx-border-primary flex items-center justify-end gap-3"},Nn={class:"fixed inset-0 z-50 flex items-center justify-center"},Un={class:"relative w-full max-w-sm mx-4 rounded-lg bg-sendx-card shadow-xl border border-sendx-border-primary p-6"},En={class:"flex items-start gap-3 mb-4"},Vn=e("div",{class:"h-10 w-10 rounded-full bg-red-500/10 flex items-center justify-center shrink-0"},[e("svg",{class:"h-5 w-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])],-1),Rn={class:"text-sm font-semibold text-sendx-text-primary"},Gn={class:"text-xs text-sendx-text-secondary mt-1"},Hn={class:"text-sendx-text-primary"},Xn={class:"flex items-center justify-end gap-3"},Yn={class:"fixed inset-0 z-50 flex items-center justify-center"},qn={class:"relative w-full max-w-sm mx-4 rounded-lg bg-sendx-card shadow-xl border border-sendx-border-primary p-6"},Jn={class:"flex items-start gap-3 mb-4"},Wn=e("div",{class:"h-10 w-10 rounded-full bg-red-500/10 flex items-center justify-center shrink-0"},[e("svg",{class:"h-5 w-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})])],-1),Kn={class:"text-sm font-semibold text-sendx-text-primary"},Qn={class:"text-xs text-sendx-text-secondary mt-1"},Zn={class:"text-sendx-text-primary"},eo={class:"flex items-center justify-end gap-3"},to={class:"flex justify-end pt-2"},so=e("svg",{class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"})],-1),bo={__name:"plans",setup(no){const y=tt(),oe=Ve(),ke=M(()=>y.config),I=u([]),re=u(!1),q=u(!1),E=u(!1),$=u(!1),J=u(null),V=u([]),W=u(!1),R=u(!1),k=u(!1),P=u(!1),ae=u(null),ie=u({}),C=u(!1),K=u(null),A=u(""),F=u(!1),L=u(null),G=u("contact"),Q=u(!1),z=u(!1),O=u(null),H=u("contact"),Z=u(!1),ee=M(()=>!!ke.value.gatewayOnboarded),Ce=Ge,de=M(()=>{const t=new Set(V.value.filter(a=>a.isActive).map(a=>
1a.addOnId)),s=[];for(const[a,c]of Object.entries(Re)){if(!Ce.has(c)||t.has(c))continue;const _=Y[c];s.push({id:c,name:a,displayName:_?.displayName||a.replace(/_/g," ").toLowerCase().replace(/\b\w/g,n=>n.toUpperCase()),sendxBillingType:_?.billingType||"free"})}return s.sort((a,c)=>a.displayName.localeCompare(c.displayName))}),h=M(()=>r.value.addOnId&&Y[r.value.addOnId]||null),Ae=M(()=>{if(!r.value.addOnId)return"";const t=de.value.find(a=>a.id===r.value.addOnId);return t?t.displayName:Y[r.value.addOnId]?.displayName||""}),Ie=t=>{r.value.addOnId=t.id,k.value=!1},Pe=()=>{if(!P.value){const t=ae.value?.getBoundingClientRect();t&&(ie.value={position:"fixed",top:`${t.bottom+4}px`,left:`${t.left}px`,width:`${t.width}px`})}P.value=!P.value},le=()=>({name:"",description:"",contactLimit:null,priceInCents:0,currency:"USD",billingInterval:"month",isDefault:!1,sortOrder:0}),x=u(le()),D=u(""),B=u(""),ce=(t,s)=>{let a=t.target.value;a=a.replace(/[^0-9.]/g,"");const c=a.split(".");c.length>2&&(a=c[0]+"."+c.slice(1).join("")),c.length===2&&c[1].length>2&&(a=c[0]+"."+c[1].substring(0,2)),t.target.value=a;const _=parseFloat(a),n=isNaN(_)?0:Math.round(_*100);s==="contact"?(D.value=a,x.value.priceInCents=n):(B.value=a,r.value.priceInCents=n)},ue=t=>{t==="contact"?x.value.priceInCents>0?D.value=(x.value.priceInCents/100).toFixed(2):D.value="":r.value.priceInCents>0?B.value=(r.value.priceInCents/100).toFixed(2):B.value=""},Me=t=>{let s=t.target.value.replace(/[^0-9.]/g,"");const a=s.split(".");a.length>2&&(s=a[0]+"."+a.slice(1).join("")),t.target.value=s,A.value=s;const c=parseFloat(s);r.value.usagePriceCents=isNaN(c)?0:c*100},De=()=>{if(r.value.usagePriceCents>0){const t=r.value.usagePriceCents/100;A.value=parseFloat(t.toFixed(6)).toString()}else A.value=""},Be=t=>{if(!t||t<=0)return"0";const s=t/100;return parseFloat(s.toFixed(6)).toString()},xe=()=>({addOnId:0,name:"",description:"",priceInCents:0,usagePriceCents:0,currency:"USD",billingInterval:"month",billingType:""}),r=u(xe()),pe=M(()=>ge(x.value.contactLimit)),me=M(()=>_e(r.value.addOnId));He(()=>r.value.addOnId,t=>{if(!t||C.value)return;const s=Y[t];s&&(r.value.billingType=s.billingType,r.value.name=s.displayName,r.value.description=s.description||"",s.interval&&(r.value.billingInterval=s.interval))});const T=async()=>{re.value=!0;try{const t=await y.fetchPlans();I.value=t||[]}catch(t){console.warn("Failed to load plans:",t)}finally{re.value=!1}},N=async()=>{try{const t=await y.fetchAddonPlans();V.value=t||[]}catch(t){console.warn("Failed to load addon plans:",t)}};Xe(()=>{T(),N(),y.fetchConfig().catch(()=>{})});const je=async()=>{for(let t=0;t<I.value.length;t++){const s=I.value[t];if(s.sortOrder!==t){s.sortOrder=t;try{await y.updatePlan(s.id,{sortOrder:t})}catch(a){console.warn("Failed to update sort order for plan:",s.id,a)}}}},Se=()=>{$.value=!1,J.value=null,x.value=le(),D.value="",E.value=!0},$e=t=>{$.value=!0,J.value=t.id,x.value={name:t.name,description:t.description||"",contactLimit:t.contactLimit,priceInCents:t.priceInCents,currency:t.currency||"USD",billingInterval:t.billingInterval||"month",isDefault:t.isDefault||!1,sortOrder:t.sortOrder||0},D.value=(t.priceInCents/100).toFixed(2),E.value=!0},te=()=>{E.value=!1},Fe=async()=>{if(!x.value.name?.trim()){p("Plan name is required",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}if(!x.value.contactLimit||x.value.contactLimit<=0){p("Contact limit must be greater than 0",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}if(!x.value.priceInCents||x.value.priceInCents<=0){p("Price must be greater than $0",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}const t=ge(x.value.contactLimit);if(t>0&&x.value.priceInCents<t){p(`Minimum price for ${x.value.contactLimit.toLocaleString()} contacts is $${(t/100).toFixed(2)} (SendX's price for this tier)`,{type:"warning",theme:"auto",autoClose:5e3,transition:"slide"});return}q.value=!0;try{$.value?(await y.updatePlan(J.value,x.value),p("Plan updated successfully",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"})):(await y.createPlan(x.value),p("Plan created successfully",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"})),te(),await T()}catch(s){p(s?.data?.error||s?.data?.message||"Failed to save plan",{type:"error",theme:"auto",autoClose:3e3,transition:"slide"})}finally{q.value=!1}},Le=()=>{C.value=!1,K.value=null,r.value=xe(),B.value="",A.value="",k.value=!1,R.value=!0},ze=t=>{C.value=!0,K.value=t.id,r.value={addOnId:t.addOnId,name:t.name,description:t.description||"",priceInCents:t.priceInCents,usagePriceCents:t.usagePriceCents||0,currency:t.currency||"USD",billingInterval:t.billingInterval||"month",billingType:t.billingType||""},B.value=(t.priceInCents/100).toFixed(2),t.usagePriceCents>0?A.value=parseFloat((t.usagePriceCents/100).toFixed(6)).toString():A.value="",k.value=!1,R.value=!0},se=()=>{R.value=!1,k.value=!1,P.value=!1,A.value=""},Oe=async()=>
1{if(!r.value.addOnId){p("Please select an addon",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}if(!r.value.name?.trim()){p("Display name is required",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}if(!r.value.priceInCents||r.value.priceInCents<=0){p("Base price must be greater than $0",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}const t=_e(r.value.addOnId);if(t>0&&r.value.priceInCents<t){const s=h.value?.displayName||"this addon";p(`Minimum base price for ${s} is $${(t/100).toFixed(2)} (matching SendX's pricing)`,{type:"warning",theme:"auto",autoClose:5e3,transition:"slide"});return}if(h.value?.billingType===st.USAGE_METERED&&(!r.value.usagePriceCents||r.value.usagePriceCents<=0)){p("Usage price per unit is required for metered addons",{type:"warning",theme:"auto",autoClose:3e3,transition:"slide"});return}W.value=!0;try{C.value?(await y.updateAddonPlan(K.value,r.value),p("Addon pricing updated",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"})):(await y.createAddonPlan(r.value),p("Addon pricing created",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"})),se(),await N()}catch(s){p(s?.data?.error||s?.data?.message||"Failed to save addon pricing",{type:"error",theme:"auto",autoClose:3e3,transition:"slide"})}finally{W.value=!1}},ve=async(t,s)=>{try{s==="addon"?(await y.updateAddonPlan(t.id,{isActive:!0}),p("Addon pricing reactivated",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"}),await N()):(await y.updatePlan(t.id,{isActive:!0}),p("Plan reactivated",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"}),await T())}catch(a){p(a?.data?.error||a?.data?.message||"Failed to reactivate",{type:"error",theme:"auto",autoClose:3e3,transition:"slide"})}},ye=async t=>{try{const s=await y.fetchConfig(),a=Array.isArray(s.allowedAddons)?s.allowedAddons:[];if(!a.includes(t))return;const c=a.filter(n=>n!==t),_={...y.config,allowedAddons:JSON.stringify(c)};await y.updateConfig(_)}catch(s){console.warn("Failed to sync feature gating after plan removal:",s)}},he=(t,s)=>{L.value=t,G.value=s,F.value=!0},Te=async()=>{Q.value=!0;try{if(G.value==="addon"){const t=L.value.addOnId;await y.deleteAddonPlan(L.value.id),await N(),await ye(t),p("Addon pricing deactivated",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"})}else await y.deletePlan(L.value.id),p("Plan deactivated",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"}),await T();F.value=!1}catch(t){p(t?.data?.error||t?.data?.message||"Failed to deactivate",{type:"error",theme:"auto",autoClose:3e3,transition:"slide"})}finally{Q.value=!1}},be=(t,s)=>{O.value=t,H.value=s,z.value=!0},Ne=async()=>{Z.value=!0;try{if(H.value==="addon"){const t=O.value.addOnId;await y.hardDeleteAddonPlan(O.value.id),await N(),await ye(t),p("Addon pricing deleted",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"})}else await y.hardDeletePlan(O.value.id),p("Plan deleted",{type:"success",theme:"auto",autoClose:3e3,transition:"slide"}),await T();z.value=!1}catch(t){p(t?.data?.error||t?.data?.message||"Failed to delete",{type:"error",theme:"auto",autoClose:3e3,transition:"slide"})}finally{Z.value=!1}},fe=t=>({free:"Free",fixed:"Subscription",usage_metered:"Usage metered",fixed_multi_unit:"Per-unit",recharge:"One-time"})[t]||t||"Custom";return(t,s)=>{const a=Ue,c=Ee,_=Ye("click-outside");return i(),d("div",nt,[ot,o(ee)?v("",!0):(i(),d("div",rt,[at,e("div",null,[it,e("p",dt,[m(" You need to connect a payment gateway before creating pricing plans. "),f(a,{to:`/addon/whitelabel/${o(oe).params.id}/setup/billing`,class:"text-sendx-text-light hover:underline"},{default:g(()=>[m(" Set up billing gateway ")]),_:1},8,["to"])])])])),e("div",lt,[e("div",ct,[ut,f(c,{type:"primary",size:"md",icon:o(we),disabled:!o(ee),onClick:Se},{default:g(()=>[m(" Create plan ")]),_:1},8,["icon","disabled"])]),e("div",xt,[e("table",pt,[mt,f(o(et),{modelValue:o(I),"onUpdate:modelValue":s[0]||(s[0]=n=>qe(I)?I.value=n:null),tag:"tbody","item-key":"id",handle:".drag-handle",onEnd:je},{item:g(({element:n})=>[e("tr",vt,[yt,e("td",ht,[e("div",null,[e("div",bt,[e("p",ft,l(n.name),1),n.isDefault?(i(),d("span",gt," Popular ")):v("",!0),n.gatewayPriceId?(i(),d("span",_t," Synced ")):v("",!0)]),n.description?(i(),d("p",wt,l(n.description),1)):v("",!0)])]),e("td",kt,[e("span",Ct,l(n.contactLimit.toLocaleStr
1ing()),1)]),e("td",At,[e("span",It,"$"+l((n.priceInCents/100).toFixed(2)),1)]),e("td",Pt,[e("span",Mt,l(n.billingInterval==="year"?"Yearly":"Monthly"),1)]),e("td",Dt,[e("span",{class:j([n.isActive?"bg-green-500/15 text-green-500 border-green-500/20":"bg-red-500/15 text-red-500 border-red-500/20","inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium border"])},l(n.isActive?"Active":"Inactive"),3)]),e("td",Bt,[e("div",jt,[e("button",{onClick:w=>$e(n),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-sendx-secondary",title:"Edit"},Ft,8,St),n.isActive?(i(),d("button",{key:0,onClick:w=>he(n,"contact"),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-red-500/10 hover:text-red-500",title:"Deactivate"},Ot,8,Lt)):(i(),d("button",{key:1,onClick:w=>ve(n,"contact"),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-green-500/10 hover:text-green-500",title:"Reactivate"},Ut,8,Tt)),e("button",{onClick:w=>be(n,"contact"),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-red-500/10 hover:text-red-500",title:"Delete"},Rt,8,Et)])])])]),_:1},8,["modelValue"]),o(I).length===0?(i(),d("tbody",Gt,Xt)):v("",!0)])])]),e("div",Yt,[e("div",qt,[Jt,f(c,{type:"primary",size:"md",icon:o(we),disabled:!o(ee),onClick:Le},{default:g(()=>[m(" Add addon pricing ")]),_:1},8,["icon","disabled"])]),e("div",Wt,[e("table",Kt,[Qt,e("tbody",null,[(i(!0),d(S,null,ne(o(V),n=>(i(),d("tr",{key:n.id,class:"border-b border-sendx-border-primary last:border-0"},[e("td",Zt,[e("div",null,[e("div",es,[e("p",ts,l(n.name),1),n.gatewayPriceId?(i(),d("span",ss," Synced ")):v("",!0)]),n.description?(i(),d("p",ns,l(n.description),1)):v("",!0)])]),e("td",os,[e("span",rs,"$"+l((n.priceInCents/100).toFixed(2)),1),n.billingType==="usage_metered"&&n.usagePriceCents>0?(i(),d("span",as," + $"+l(Be(n.usagePriceCents))+"/unit ",1)):v("",!0)]),e("td",is,[e("span",ds,l(n.billingInterval==="year"?"Yearly":"Monthly"),1)]),e("td",ls,[e("span",{class:j([n.isActive?"bg-green-500/15 text-green-500 border-green-500/20":"bg-red-500/15 text-red-500 border-red-500/20","inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium border"])},l(n.isActive?"Active":"Inactive"),3)]),e("td",cs,[e("div",us,[e("button",{onClick:w=>ze(n),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-sendx-secondary",title:"Edit"},ms,8,xs),n.isActive?(i(),d("button",{key:0,onClick:w=>he(n,"addon"),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-red-500/10 hover:text-red-500",title:"Deactivate"},hs,8,vs)):(i(),d("button",{key:1,onClick:w=>ve(n,"addon"),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-green-500/10 hover:text-green-500",title:"Reactivate"},gs,8,bs)),e("button",{onClick:w=>be(n,"addon"),class:"h-7 w-7 flex items-center justify-center rounded-md text-sendx-text-secondary hover:bg-red-500/10 hover:text-red-500",title:"Delete"},ks,8,_s)])])]))),128)),o(V).length===0?(i(),d("tr",Cs,Is)):v("",!0)])])])]),b(e("div",Ps,[e("div",{class:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:te}),e("div",Ms,[e("div",Ds,[e("h3",Bs,l(o($)?"Edit plan":"Create plan"),1)]),e("div",js,[e("div",null,[Ss,b(e("input",{"onUpdate:modelValue":s[1]||(s[1]=n=>o(x).name=n),type:"text",placeholder:"e.g. Starter, Growth, Pro",class:"w-full px-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active"},null,512),[[U,o(x).name]])]),e("div",null,[$s,b(e("textarea",{"onUpdate:modelValue":s[2]||(s[2]=n=>o(x).description=n),rows:"2",placeholder:"Brief description of this plan",class:"w-full px-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active resize-none"},null,512),[[U,o(x).description]])]),e("div",null,[Fs,b(e("input",{"onUpdate:modelValue":s[3]||(s[3]=n=>o(x).contactLimit=n),type:"number",min:"0",placeholder:"e.g. 1000",class:"w-full px-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active"},null,512),[[U,o(x).contactLimit,void 0,{number:!0}]])]),e("div",Ls,[e("div",null,[zs,e("div",Os,[Ts,e("input",{value:o(D),onInput:s[4]||(s[4]=n=>ce(n,"contact")),onBlur:s[5]||(s[5]=n=>ue("contact")),type:"text",inputmode:"decimal",placeholder:"29.00",class:"w-full pl-7 pr-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active"},null,40,Ns)]),o(pe)>0?(i(),d("p",Us," Min: $"+l((o(pe)/100).toFixed(2))+" (SendX's rate) ",1)):v("",!0)]),e("div",null,[Es,b(e("select",{"onUpdate:modelValue":s[6]||(s[6]=n=>o(x).billingInterval=n),class:"w-full px-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary"},Gs,512),[[Je,o(x).billingInterval]])])]),e("div",Hs,[e("label",Xs,[b(e("input",{"onUpdate:modelValue":s[7]||(s[7]=n=>
1o(x).isDefault=n),type:"checkbox",class:"h-4 w-4 rounded border-sendx-border-primary text-sendx-button-primary focus:ring-sendx-border-active"},null,512),[[We,o(x).isDefault]]),Ys])])]),e("div",qs,[f(c,{type:"secondary",size:"lg",onClick:te},{default:g(()=>[m(" Cancel ")]),_:1}),f(c,{type:"primary",size:"lg",loading:o(q),onClick:Fe},{default:g(()=>[m(l(o($)?"Update plan":"Create plan"),1)]),_:1},8,["loading"])])])],512),[[X,o(E)]]),b(e("div",Js,[e("div",{class:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:se}),e("div",Ws,[e("div",Ks,[e("h3",Qs,l(o(C)?"Edit addon pricing":"Add addon pricing"),1)]),e("div",Zs,[e("div",null,[en,b((i(),d("div",tn,[e("button",{type:"button",onClick:s[8]||(s[8]=n=>!o(C)&&(k.value=!o(k))),class:j(["relative w-full border border-sendx-border-primary rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-sendx-border-active bg-sendx-secondary text-sendx-text-primary focus:border-sendx-border-active sm:text-sm",o(C)?"opacity-50 cursor-not-allowed":"cursor-pointer"])},[e("span",{class:j(["block truncate",o(r).addOnId?"":"text-sendx-text-secondary"])},l(o(Ae)||"Select an addon"),3),sn],2),o(k)?(i(),d("ul",nn,[(i(!0),d(S,null,ne(o(de),n=>(i(),d("li",{key:n.id,onClick:w=>Ie(n),class:"cursor-pointer select-none relative py-2 pl-3 pr-9 text-sendx-text-primary hover:bg-sendx-hover-primary"},[e("span",rn,[m(l(n.displayName)+" ",1),n.sendxBillingType!=="free"?(i(),d("span",an,"("+l(fe(n.sendxBillingType))+")",1)):v("",!0)]),o(r).addOnId===n.id?(i(),d("span",dn,cn)):v("",!0)],8,on))),128))])):v("",!0)])),[[_,()=>k.value=!1]])]),o(h)?(i(),d("div",un,[e("div",xn,[e("span",pn,l(fe(o(h).billingType)),1),e("span",mn,"SendX price: "+l(o(h).displayPrice),1)]),e("p",vn,l(o(h).description),1)])):v("",!0),e("div",null,[yn,b(e("input",{"onUpdate:modelValue":s[9]||(s[9]=n=>o(r).name=n),type:"text",placeholder:"e.g. Transactional Email",class:"w-full px-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active"},null,512),[[U,o(r).name]])]),e("div",null,[hn,b(e("textarea",{"onUpdate:modelValue":s[10]||(s[10]=n=>o(r).description=n),rows:"2",placeholder:"Brief description",class:"w-full px-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active resize-none"},null,512),[[U,o(r).description]])]),e("div",{class:j(o(h)?.billingType==="recharge"?"":"grid grid-cols-2 gap-3")},[e("div",null,[e("label",bn,l(o(h)?.billingType==="recharge"?"Price per session (USD)":o(h)?.billingType==="usage_metered"?"Base price (USD)":"Price (USD)"),1),e("div",fn,[gn,e("input",{value:o(B),onInput:s[11]||(s[11]=n=>ce(n,"addon")),onBlur:s[12]||(s[12]=n=>ue("addon")),type:"text",inputmode:"decimal",placeholder:"10.00",class:"w-full pl-7 pr-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active"},null,40,_n)]),o(me)>0?(i(),d("p",wn," Min: $"+l((o(me)/100).toFixed(2))+" (SendX's rate) ",1)):v("",!0)]),o(h)?.billingType!=="recharge"?b((i(),d("div",kn,[Cn,e("button",{ref_key:"billingIntervalBtnRef",ref:ae,type:"button",onClick:s[13]||(s[13]=n=>!o(h)?.forceInterval&&Pe()),class:j(["relative w-full border border-sendx-border-primary rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-sendx-border-active bg-sendx-secondary text-sendx-text-primary focus:border-sendx-border-active sm:text-sm",o(h)?.forceInterval?"opacity-50 cursor-not-allowed":"cursor-pointer"])},[e("span",An,l(o(r).billingInterval==="year"?"Yearly":"Monthly"),1),In],2),(i(),Ke(Ze,{to:"body"},[o(P)?(i(),d("ul",{key:0,style:Qe(o(ie)),class:"z-[500] bg-sendx-card shadow-lg max-h-64 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto overscroll-contain focus:outline-none sm:text-sm"},[(i(),d(S,null,ne([{value:"month",label:"Monthly"},{value:"year",label:"Yearly"}],n=>e("li",{key:n.value,onClick:w=>{o(r).billingInterval=n.value,P.value=!1},class:"cursor-pointer select-none relative py-2 pl-3 pr-9 text-sendx-text-primary hover:bg-sendx-hover-primary"},[e("span",Mn,l(n.label),1),o(r).billingInterval===n.value?(i(),d("span",Dn,jn)):v("",!0)],8,Pn)),64))],4)):v("",!0)]))])),[[_,()=>P.value=!1]]):v("",!0)],2),o(h)?.billingType==="usage_metered"?(i(),d("div",Sn,[e("label",$n," Usage price ($ per "+l(o(h)?.unitName||"unit")+") ",1),e("div",Fn,[Ln,e("input",{value:o(A),onInput:Me,onBlur:De,type:"text",inputmode:"decimal",placeholder:o(h)?.usagePrice?String(o(h).usagePrice):"0.003",class:"w-full pl-7 pr-3 py-2 text-sm border border-sendx-border-primary rounded-md bg-sendx-secondary text-sendx-text-primary focus:ring-sendx-border-active focus:border-sendx-border-active"},null,40,zn)]),e("p",On," Per-"+l(o(h)?.unitName||"unit")+" charge billed at end of each billing cycle ",1)])):v("",!0)]),e("div",Tn,[f(c,{type:"secondary",size:"lg",onClick:se},{default:g(()=>[m(" Cancel ")]),_:1}),f(c,{type:"primary",size:"lg",loading:o(W),onClick:Oe},{default:g(()=>[m(l(o(C)?"Update pricing":"Add pricing"),1)]),_:1},8,["loading"])])])],512),[[X,o(R)]]),b(e("div",Nn,[e("div",{class:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:s[14]||(s[14]=n=>F.value=!1)}),e("div",Un,[e("div",En,[Vn,e("div",null,[e("h3",Rn,"Deactivate "+l(o(G)==="addon"?"addon pricing":"plan"),1),e("p",Gn,[m(" Are you sure you want to deactivate "),e("strong",Hn,l(o(L)?.name),1),m("? "),o(G)==="addon"?(i(),d(S,{key:0},[m(" This addon will be removed from Feature Gating and sub-accounts will no longer see it. ")
1],64)):(i(),d(S,{key:1},[m(" New sub-accounts won't be able to subscribe to this plan. ")],64))])])]),e("div",Xn,[f(c,{type:"secondary",size:"lg",onClick:s[15]||(s[15]=n=>F.value=!1)},{default:g(()=>[m(" Cancel ")]),_:1}),f(c,{type:"delete",size:"lg",loading:o(Q),onClick:Te},{default:g(()=>[m(" Deactivate ")]),_:1},8,["loading"])])])],512),[[X,o(F)]]),b(e("div",Yn,[e("div",{class:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:s[16]||(s[16]=n=>z.value=!1)}),e("div",qn,[e("div",Jn,[Wn,e("div",null,[e("h3",Kn,"Delete "+l(o(H)==="addon"?"addon pricing":"plan"),1),e("p",Qn,[m(" Are you sure you want to permanently delete "),e("strong",Zn,l(o(O)?.name),1),m("? "),o(H)==="addon"?(i(),d(S,{key:0},[m(" The addon will be removed from Feature Gating and sub-accounts will no longer see it. ")],64)):v("",!0),m(" This action cannot be undone. ")])])]),e("div",eo,[f(c,{type:"secondary",size:"lg",onClick:s[17]||(s[17]=n=>z.value=!1)},{default:g(()=>[m(" Cancel ")]),_:1}),f(c,{type:"delete",size:"lg",loading:o(Z),onClick:Ne},{default:g(()=>[m(" Delete ")]),_:1},8,["loading"])])])],512),[[X,o(z)]]),e("div",to,[f(a,{to:`/addon/whitelabel/${o(oe).params.id}/setup/sub-accounts`,class:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-sendx-button-primary text-sendx-button-text-primary hover:opacity-90"},{default:g(()=>[m(" Continue to Sub-Accounts "),so]),_:1},8,["to"])])])}}};export{bo as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.