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