'use client';
import React from 'react';
import { useTableCell } from '../../elements/Table/TableCellProvider/index.js';
import { CheckboxInput } from '../../forms/fields/Checkbox/Input.js';
import { useSelection } from '../../providers/SelectionProvider/index.js';
const baseClass = 'select-row';
export const SelectRow = ()=>{
    const { selected, setSelection } = useSelection();
    const { rowData } = useTableCell();
    return /*#__PURE__*/ React.createElement(CheckboxInput, {
        checked: selected?.[rowData?.id],
        className: `${baseClass}__checkbox`,
        onToggle: ()=>setSelection(rowData.id)
    });
};

//# sourceMappingURL=index.js.map