import{j as n,ak as c,d as g}from"./index-BGoV7aa6.js";const p=({totalCount:i,filteredNames:l,itemName:t,parentName:s,selectedNames:o,setSelectedNames:h,hideActions:r})=>{const e=o.length===l.length,x=()=>{h(l)},j=()=>{h([])};return n.jsx("div",{children:e?n.jsxs(n.Fragment,{children:[l.length===1?n.jsxs(n.Fragment,{children:[n.jsx("b",{children:"1"})," ",t," is selected."," "]}):n.jsxs(n.Fragment,{children:["All ",n.jsx("b",{children:l.length})," ",c(t,l.length)," selected."," "]}),!r&&n.jsx(g.Button,{appearance:"link",className:"u-no-margin--bottom u-no-padding--top",onClick:j,children:"Clear selection"})]}):n.jsxs(n.Fragment,{children:[n.jsx("b",{children:o.length})," ",c(t,o.length)," selected."," ",!r&&n.jsxs(g.Button,{appearance:"link",className:"u-no-margin--bottom u-no-padding--top",onClick:x,children:["Select all ",n.jsx("b",{children:l.length})," ",l.length===i?`${c(t,l.length)} ${s?`in ${s}`:""}`:`filtered ${c(t,l.length)}`]})]})})};export{p as S};
