import { Checkbox } from '@wix/design-system';
import React from 'react';
import { observer } from 'mobx-react-lite';
function _SelectAllCheckbox(props) {
    const { state } = props;
    const { toggleIsSelectAll, picker: { collection: { result: { isEmptyAndNotFetching }, query: { hasActiveFilters, limit }, bulkSelect: { selectedCountOrTotal, select: { isNotEmptyEnabledItems: hasEnabledCheckedItems }, allSelected, hasUnchecked, collection: { result: { total }, }, }, translate: t, }, }, } = state;
    return (React.createElement(Checkbox, { dataHook: "picker-select-all-checkbox", checked: allSelected, disabled: isEmptyAndNotFetching || (hasActiveFilters && total > limit), onChange: toggleIsSelectAll, indeterminate: hasEnabledCheckedItems && (!allSelected || hasUnchecked) }, hasEnabledCheckedItems ? (React.createElement(React.Fragment, null,
        t('cairo.deselectAll'),
        " (",
        selectedCountOrTotal,
        ")")) : (React.createElement(React.Fragment, null,
        t('cairo.selectAll'),
        " (",
        total,
        ")"))));
}
export const SelectAllCheckbox = observer(_SelectAllCheckbox);
//# sourceMappingURL=SelectAllCheckbox.js.map