import{R as d,j as e,ar as i,Q as u,bO as m,b7 as l,O as x,T as C,F as g}from"./app-BgLa5dit.js";import{U as h}from"./DusGkY45.chunk.js";const j="_iconContainer_1hzyv_1",S="_loadingContainer_1hzyv_5",a={iconContainer:j,loadingContainer:S},n="shared.bulkSelectionSummary";function f(t){const[c,s]=d.useState(!1);function o(){s(!0),t.onClickSelectAll(()=>{s(!1)})}if(!t.selectedCount&&!t.showSelectingSpinner)return e.jsx(e.Fragment,{});const r=!!t.onClickSelectAll&&!t.allSelected&&t.selectAllCount!==0&&t.selectAllCount>h.USER_PAGE_LIMIT;return e.jsx("div",{className:"border border-dark rounded-3 d-flex justify-content-between align-items-center p-2 mb-3",children:t.showSelectingSpinner?e.jsx("div",{className:`px-2 d-flex align-items-center ${a.loadingContainer}`,children:e.jsx(i,{as:"div",size:"sm",animation:"border",role:"status"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsx("div",{className:`${a.iconContainer} text-white rounded-circle bg-dark me-3 ms-2 d-flex justify-content-center align-items-center`,children:e.jsx(u,{svg:m})}),e.jsx(l,{namespace:n,phrase:"selectedCount",options:{smartCount:t.selectedCount,type:t.getTypeText(t.selectedCount)}}),r?c||t.selectAllCount===void 0?e.jsx("div",{className:"px-2 py-1",children:e.jsx(i,{as:"div",size:"sm",animation:"border",role:"status"})}):e.jsx(x,{className:"info-link px-2",onClick:o,children:e.jsx(l,{namespace:n,phrase:"selectAll",options:{smartCount:t.selectAllCount,type:t.getTypeText(t.selectAllCount)}})}):e.jsx(e.Fragment,{})]}),e.jsxs("div",{className:"d-flex",children:[e.jsx("button",{className:"btn btn-link me-2",onClick:t.onClickDeselectAll,children:e.jsx(l,{namespace:n,phrase:"deselectAll"})}),e.jsx(C,{spanHack:!0,title:t.hasRostering?g.getPhrase(n,"disabled"):"",children:e.jsx("button",{className:t.hasRostering?"btn btn-outline-dark cursor-default disabled":"btn btn-outline-dark",onClick:t.onClickSelectBulk,disabled:t.hasRostering,children:t.selectBulkActionButtonText??e.jsx(l,{namespace:n,phrase:"selectBulkAction"})})})]})]})})}export{f as B};
//# sourceMappingURL=Da6gN2lx.chunk.js.map
