import { Table } from '@tanstack/react-table';
import React__default from 'react';
import { DefaultValues } from 'react-hook-form';
import { ZodObject, z } from 'zod';
import * as class_variance_authority_types from 'class-variance-authority/types';
import { VariantProps } from 'class-variance-authority';
import * as react_jsx_runtime from 'react/jsx-runtime';

type BadgeVariants = VariantProps<typeof badgeVariants>["variant"];
declare const badgeVariants: (props?: ({
    variant?: "default" | "secondary" | "destructive" | "positive" | "warning" | "info" | "outline" | null | undefined;
    subtle?: boolean | null | undefined;
} & class_variance_authority_types.ClassProp) | undefined) => string;

/** biome-ignore-all lint/suspicious/noExplicitAny: <any> */

type DefaultFilterSide = "top" | "bottom" | "left" | "right";
interface TableFilterBaseProps<TData> {
    table: Table<TData>;
    defaultSide?: DefaultFilterSide;
    disabled?: boolean;
}
type FieldFilterType = "text" | "number" | "date" | "select" | "checkbox" | "cnpj" | "dateRange" | "numeric_range" | "multiselect";
type FieldConfig<TFormValues> = {
    name: keyof TFormValues extends string ? keyof TFormValues | (string & {}) : string;
    label: string;
    placeholder: string;
    type: FieldFilterType;
    allowNegative?: boolean;
    isCurrency?: boolean;
    isPercent?: boolean;
    filterType?: "currency";
    currency?: "BRL";
    options?: {
        label: string;
        value: any;
        icon?: React__default.ReactNode;
    }[];
    items?: string[];
    style?: "badge";
    description?: string;
    decimalScale?: number;
    decimalSeparator?: string;
    thousandSeparator?: string;
};
interface TableFilterProps<TData = unknown, TSchema extends ZodObject<any> = ZodObject<any>, TFormValues = z.infer<TSchema>> extends TableFilterBaseProps<TData> {
    title: string;
    schema: TSchema;
    fieldConfigs: FieldConfig<TFormValues>[];
    defaultFilterValues: DefaultValues<TFormValues>;
    prepareFilterStorage?: (data: TFormValues) => TFormValues;
    appliedFiltersCount?: number;
    setAppliedFiltersCount?: (count: number) => void;
    filterStorage?: any;
    setFilterStorage?: (value: any) => void;
    pagination?: {
        pageIndex: number;
        pageSize: number;
    };
    setPagination?: (value: {
        pageIndex: number;
        pageSize: number;
    }) => void;
    resetKey?: number;
    applyFiltersOnMount?: boolean;
    onClearFilters?: () => void;
    /**
     * Callback chamado quando filtros são aplicados.
     * Use para filtragem server-side (API).
     * Recebe os valores dos filtros após validação.
     */
    onApplyFilters?: (filters: TFormValues) => void;
    badgeMultiselectVariant?: BadgeVariants;
    badgeMultiselectSubtle?: boolean;
}
type Operator = "eq" | "gt" | "lt" | "gte" | "lte";
type NumericFilterValue = {
    operator: Operator;
    value: number | null;
};

declare function TableFilter<TData, TSchema extends ZodObject<any>>({ table, defaultSide, disabled, title, schema, fieldConfigs, defaultFilterValues, appliedFiltersCount, setAppliedFiltersCount, applyFiltersOnMount, onClearFilters, onApplyFilters, badgeMultiselectVariant, badgeMultiselectSubtle, prepareFilterStorage, }: TableFilterProps<TData, TSchema>): react_jsx_runtime.JSX.Element;

export { TableFilter };
export type { DefaultFilterSide, FieldConfig, FieldFilterType, NumericFilterValue, Operator, TableFilterBaseProps, TableFilterProps };
