import"./DsnmJJEf.js";import{p as Q,e as V,f as W,a as o,b as Z,o as $,d as s,s as d,r as a,n as M,l as z,t as f,g as I,c as u,k as ee}from"./qex-fw8l.js";import{d as te,e as ae,s as c,a as re}from"./vzbhwc8t.js";import{i as b}from"./BnUrxEZg.js";import{e as ie,i as se}from"./HL7kq492.js";import{a as ne,p as oe}from"./M7SZIFMh.js";import{p as v}from"./pJHJUtud.js";import{i as h}from"./dc0o8kHW.js";import{B as j}from"./7CzQmogV.js";import{T as de}from"./Bg1hmqj7.js";var le=u('<div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10"><!></div>'),ce=u('<li class="flex items-baseline gap-2 py-0.5"><span class="text-muted-foreground/60">•</span> <span class="min-w-0 break-words"> </span></li>'),ve=u('<ul class="mt-3 max-h-48 overflow-y-auto rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-foreground"></ul>'),me=u('<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 ye(B,e){Q(e,!0);let D=v(e,"title",19,()=>h.t("ADMIN_NEXT.ARE_YOU_SURE")),k=v(e,"items",19,()=>[]),R=v(e,"confirmLabel",19,()=>h.t("ADMIN_NEXT.CONFIRM")),X=v(e,"cancelLabel",19,()=>h.t("ADMIN_NEXT.CANCEL")),w=v(e,"variant",3,"default");function O(r){r.target===r.currentTarget&&e.oncancel()}function P(r){r.key==="Escape"&&e.oncancel()}var y=V();ae("keydown",$,function(...r){(e.open?P:void 0)?.apply(this,r)});var U=W(y);{var F=r=>{var l=me(),N=s(l),x=s(N),E=s(x);{var K=t=>{var i=le(),n=s(i);de(n,{size:20,class:"text-destructive"}),a(i),o(t,i)};b(E,t=>{w()==="destructive"&&t(K)})}var T=d(E,2),_=s(T),S=s(_,!0);a(_);var g=d(_,2),Y=s(g,!0);a(g);var q=d(g,2);{var G=t=>{var i=ve();ie(i,21,k,se,(n,m)=>{var p=ce(),L=d(s(p),2),J=s(L,!0);a(L),a(p),f(()=>c(J,I(m))),o(n,p)}),a(i),o(t,i)};b(q,t=>{k().length>0&&t(G)})}a(T),a(x);var A=d(x,2),C=s(A);j(C,{variant:"outline",size:"sm",get onclick(){return e.oncancel},children:(t,i)=>{M();var n=z();f(()=>c(n,X())),o(t,n)},$$slots:{default:!0}});var H=d(C,2);{let t=ee(()=>w()==="destructive"?"destructive":"default");j(H,{get variant(){return I(t)},size:"sm",get onclick(){return e.onconfirm},children:(i,n)=>{M();var m=z();f(()=>c(m,R())),o(i,m)},$$slots:{default:!0}})}a(A),a(N),a(l),ne(l,t=>oe?.(t)),f(()=>{c(S,D()),c(Y,e.message)}),re("click",l,O),o(r,l)};b(U,r=>{e.open&&r(F)})}o(B,y),Z()}te(["click"]);export{ye as C};
