/
snap
/
lxd
/
current
/
share
/
lxd-ui
/
assets
/
File Upload :
llllll
Current File: //snap/lxd/current/share/lxd-ui/assets/BulkDeleteButton-CR5M7boY.js
import{y as C,j as s,aj as o,d as r,v as N}from"./index-B3cgCbnJ.js";const E=({entities:n,deletableEntities:d,disabledReason:c,entityType:e,bulkDeleteBreakdown:t,confirmationButtonProps:h,onDelete:m,buttonLabel:x="Delete",className:j,modalContentPrefix:u})=>{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:[u,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},j),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};
Copyright ©2k19 -
Hexid
|
Tex7ure