import{r as d,j as e}from"./@radix-3bj3otF9.js";import{L as c,M as p,B as h,N as o}from"./index-Cs2FY84s.js";import{S as m}from"./trash-B0fyghWi.js";import{D as u,a as x}from"./DeleteAlertDialog-8-J1PO_I.js";function f({itemName:s,selectedItemCount:r,onDeleteSelected:n}){const[a,t]=d.useState(!1);async function l(){await n(),t(!1)}const i=`Delete ${o(r,s)}`;return e.jsxs(c,{open:a,onOpenChange:t,children:[e.jsx(p,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(m,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(u,{title:i,handleDelete:l,children:e.jsxs(x,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function v({itemName:s,selectedItemCount:r,onDeleteSelected:n,children:a}){const t=o(r,s),l=`${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:l}),e.jsx(f,{itemName:s,selectedItemCount:r,onDeleteSelected:n}),a]})}export{v as B};
