import{U as C,j as e,a2 as a,d as c,K as B}from"./index-C88DWJny.js";const N=({entities:n,deletableEntities:i,disabledReason:o,entityType:s,bulkDeleteBreakdown:d,confirmationButtonProps:h,onDelete:m,buttonLabel:u="Delete",className:x,modalContentPrefix:j})=>{const p=C(),g=n.length,l=i.length,t=d?.map(r=>e.jsxs("li",{className:"p-list__item",children:["- ",r]},r))||[],f=e.jsxs(e.Fragment,{children:[j,t.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("b",{children:g})," ",a(s,n.length)," ","selected:"]}),e.jsx("ul",{className:"p-list",children:t})]}),e.jsxs("p",{className:t.length>0?"u-no-padding--top":"",children:["This will permanently delete"," ",e.jsxs("strong",{children:[l," ",a(s,l)]}),".",`
`,"This action cannot be undone, and can result in data loss."]})]});return e.jsxs(c.ConfirmationButton,{className:B({"has-icon":!p},x),onHoverText:o??`Delete ${a(s,n.length)}`,disabled:l===0||!!o,shiftClickEnabled:!0,showShiftClickHint:!0,...h,confirmationModalProps:{title:"Confirm delete",children:f,confirmButtonLabel:"Delete",onConfirm:m},children:[e.jsx(c.Icon,{name:"delete"}),e.jsx("span",{className:"u-hide--small",children:u})]})};export{N as B};
