import"./DsnmJJEf.js";import{p as q,e as F,f as K,a as l,b as Y,o as G,d as r,s as v,r as i,n as T,l as A,t as x,g as H,c as z,h as J}from"./BfUaJvxP.js";import{d as Q,e as V,s as f,a as W}from"./Bci9YmGs.js";import{p as u,i as L}from"./C8yDvkQM.js";import{a as Z}from"./qtKPqwB4.js";import{i as g}from"./CF1ujZlL.js";import{B as M}from"./CuIpA3jY.js";import{T as $}from"./BR2Og6TN.js";function ee(n,e=document.body){const c=typeof e=="string"?document.querySelector(e):e;return c&&c.appendChild(n),{destroy(){n.parentNode&&n.parentNode.removeChild(n)}}}var te=z('<div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10"><!></div>'),ae=z('<div class="fixed inset-0 z-50 flex items-center justify-center bg-neutral-900/75 p-4 backdrop-blur-sm"><div class="w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-2xl"><div class="flex gap-4"><!> <div class="min-w-0 flex-1"><h3 class="text-base font-semibold text-foreground"> </h3> <p class="mt-1.5 text-sm text-muted-foreground"> </p></div></div> <div class="mt-5 flex justify-end gap-2"><!> <!></div></div></div>');function ve(n,e){q(e,!0);let c=u(e,"title",19,()=>g.t("ADMIN_NEXT.ARE_YOU_SURE")),I=u(e,"confirmLabel",19,()=>g.t("ADMIN_NEXT.CONFIRM")),j=u(e,"cancelLabel",19,()=>g.t("ADMIN_NEXT.CANCEL")),p=u(e,"variant",3,"default");function B(t){t.target===t.currentTarget&&e.oncancel()}function D(t){t.key==="Escape"&&e.oncancel()}var b=F();V("keydown",G,function(...t){(e.open?D:void 0)?.apply(this,t)});var R=K(b);{var X=t=>{var d=ae(),h=r(d),m=r(h),y=r(m);{var O=a=>{var s=te(),o=r(s);$(o,{size:20,class:"text-destructive"}),i(s),l(a,s)};L(y,a=>{p()==="destructive"&&a(O)})}var k=v(y,2),_=r(k),P=r(_,!0);i(_);var N=v(_,2),S=r(N,!0);i(N),i(k),i(m);var w=v(m,2),E=r(w);M(E,{variant:"outline",size:"sm",get onclick(){return e.oncancel},children:(a,s)=>{T();var o=A();x(()=>f(o,j())),l(a,o)},$$slots:{default:!0}});var U=v(E,2);{let a=J(()=>p()==="destructive"?"destructive":"default");M(U,{get variant(){return H(a)},size:"sm",get onclick(){return e.onconfirm},children:(s,o)=>{T();var C=A();x(()=>f(C,I())),l(s,C)},$$slots:{default:!0}})}i(w),i(h),i(d),Z(d,a=>ee?.(a)),x(()=>{f(P,c()),f(S,e.message)}),W("click",d,B),l(t,d)};L(R,t=>{e.open&&t(X)})}l(n,b),Y()}Q(["click"]);export{ve as C};
