'use strict';

var jsxRuntime = require('../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var reactIcons_esm = require('../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
var button = require('../button/button.cjs');
var flex = require('../flex/flex.cjs');
var useTable = require('./hooks/useTable.cjs');

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

exports.DataTableClearFilter = DataTableClearFilter;
//# sourceMappingURL=DataTableClearFilter.cjs.map
