Your IP : 216.73.217.95


Current Path : /proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/
Upload File :
Current File : //proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/BulkDeleteButton-DbqPCHnz.js

import{H as C,j as e,T as a,d as c,s as B}from"./index-BsQN_SZU.js";const N=({entities:s,deletableEntities:i,disabledReason:o,entityType:n,bulkDeleteBreakdown:d,confirmationButtonProps:h,onDelete:m,buttonLabel:u="Delete",className:x,modalContentPrefix:j})=>{const p=C(),g=s.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(n,s.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(n,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(n,s.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};