'use client';
import React from 'react';
import { CheckboxInput } from '../../forms/fields/Checkbox/Input.js';
import { SelectAllStatus, useSelection } from '../../providers/SelectionProvider/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
const baseClass = 'select-all';
export const SelectAll = ()=>{
    const { selectAll, toggleAll } = useSelection();
    const { i18n } = useTranslation();
    return /*#__PURE__*/ React.createElement(CheckboxInput, {
        "aria-label": selectAll === SelectAllStatus.None ? i18n.t('general:selectAllRows') : i18n.t('general:deselectAllRows'),
        checked: selectAll === SelectAllStatus.AllInPage || selectAll === SelectAllStatus.AllAvailable,
        className: `${baseClass}__checkbox`,
        id: "select-all",
        name: "select-all",
        onToggle: ()=>toggleAll(),
        partialChecked: selectAll === SelectAllStatus.Some
    });
};

//# sourceMappingURL=index.js.map