/*!
 * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
 *
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * See the License for the specific language governing permissions and limitations under the License.
 */
import { MRT_ColumnDef, MRT_RowData } from "material-react-table";
import { ReactNode } from "react";
type Option = {
    label: string;
    value: string;
};
export type DataFilterValue = string | string[] | Option[] | undefined;
export type UpdateFiltersOrValues = ({ filterId, value, }: {
    filterId: string;
    value: DataFilterValue;
}) => void;
export type DataFilter = {
    /**
     * A unique ID for the filter, typically the same id
     * as the column it'll be applied to.
     */
    id: Exclude<MRT_ColumnDef<MRT_RowData>["accessorKey"], undefined>;
    /**
     * `Autocomplete` normally only allows values that exist in the list box. This feature allows you to enter in any value in the text field and have that be the stored value in `Autocomplete`
     *
     * NOTE: This only applies when `variant` is `autocomplete`
     */
    isCustomValueAllowed?: boolean;
    /**
     * The human-friendly name of the filter.
     */
    label: string;
    /**
     * If the filter control has preset options (such as a select or multi-select),
     * these are the options provided.
     */
    options?: Option[];
    /**
     * A callback which renders a custom filter control
     */
    render?: (updateFilters: UpdateFiltersOrValues) => ReactNode;
    /**
     * The current value of the filter. Typically a string, but
     * filters that allow for multiple selections (such as multi-select)
     * can accept an array.
     */
    value?: DataFilterValue;
    /**
     * The type of filter, which determines which filtering control
     * is shown.
     */
    variant?: MRT_ColumnDef<MRT_RowData>["filterVariant"];
};
export type DataFiltersProps = {
    /**
     * A slot for optional additional actions, like buttons, to be displayed
     * on the opposite side of the top row from the search and filter controls.
     */
    additionalActions?: ReactNode;
    /**
     * The starting value of the search input
     */
    defaultSearchTerm?: string;
    /**
     * The filters available in the filter menu. If undefined,
     * the filter menu won't be shown.
     */
    filters?: Array<DataFilter>;
    /**
     * If true, a Search button will be provided alongside the search input
     * and `onChangeSearch` will fire when the button is clicked, rather than
     * whenever the input value changes.
     */
    hasSearchSubmitButton?: boolean;
    /**
     * If true, the filter and search will be disabled
     */
    isDisabled?: boolean;
    /**
     * The callback that's fired when filter values change.
     */
    onChangeFilters?: (filters: Array<DataFilter>) => void;
    /**
     * The callback that's fired when the search input changes
     * (either on change or on submit, based on the value of `hasSearchSubmitButton`).
     * If this is undefined, the search input will not be shown.
     */
    onChangeSearch?: (value: string) => void;
    /**
     * The debounce time, in milliseconds, for the search input firing
     * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,
     * this doesn't do anything.
     */
    searchDelayTime?: number;
};
declare const MemoizedDataFilters: import("react").MemoExoticComponent<({ onChangeSearch, onChangeFilters, hasSearchSubmitButton, searchDelayTime, defaultSearchTerm, additionalActions, filters: filtersProp, isDisabled, }: DataFiltersProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
export { MemoizedDataFilters as DataFilters };
//# sourceMappingURL=DataFilters.d.ts.map