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