import{j as e}from"./@radix-D8tIKeo-.js";import{J as d,K as c,B as p,L as l}from"./index-B44sgOyQ.js";import{S as h}from"./trash-Dp8wQrEE.js";import{D as m,a as u}from"./DeleteAlertDialog-DbZA_NGz.js";import{a as x}from"./@monaco-editor-CuNQBT0l.js";function f({itemName:s,selectedItemCount:r,onDeleteSelected:n}){const[a,t]=x.useState(!1);async function o(){await n(),t(!1)}const i=`Delete ${l(r,s)}`;return e.jsxs(d,{open:a,onOpenChange:t,children:[e.jsx(c,{asChild:!0,children:e.jsxs(p,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(h,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(m,{title:i,handleDelete:o,children:e.jsxs(u,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function A({itemName:s,selectedItemCount:r,onDeleteSelected:n,children:a}){const t=l(r,s),o=`${r} ${t} selected`;return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:o}),e.jsx(f,{itemName:s,selectedItemCount:r,onDeleteSelected:n}),a]})}export{A as B};
