import { j as jsxRuntimeExports } from '../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
import { Cross2Icon } from '../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js';
import { Button } from '../button/button.js';
import { Flex } from '../flex/flex.js';
import { useTable } from './hooks/useTable.js';

function DataTableClearFilter({ children, ...props }) {
    const { resetColumns, table } = useTable();
    return (jsxRuntimeExports.jsx(Button, { variant: "ghost", onClick: () => {
            table.resetColumnFilters();
            resetColumns();
        }, ...props, children: children || (jsxRuntimeExports.jsxs(Flex, { gap: "small", align: "center", justify: "center", style: { textWrap: "nowrap" }, children: ["Clear filters ", jsxRuntimeExports.jsx(Cross2Icon, { width: 12, height: "12" })] })) }));
}

export { DataTableClearFilter };
//# sourceMappingURL=DataTableClearFilter.js.map
