import { jsx as _jsx } from "react/jsx-runtime";
import { cn } from "#scalars";
import { useInternalTableState } from "../table-provider/table-provider.js";
import { HeaderCell } from "./header-cell.js";
const HeaderNumberTd = ({ className, isAllRowsSelected, handleSelectAllRows, ...props }) => {
    const { config: { showRowNumbers, allowRowSelection }, } = useInternalTableState();
    if (!showRowNumbers && !allowRowSelection) {
        return null;
    }
    return (_jsx(HeaderCell, { className: cn("min-w-9 select-none border-r border-gray-300 text-center", allowRowSelection && "cursor-pointer", isAllRowsSelected && "bg-blue-900 text-white", className), onClick: handleSelectAllRows, ...props, children: showRowNumbers ? "#" : "" }));
};
export { HeaderNumberTd };
//# sourceMappingURL=header-number-td.js.map