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