import { type Key, type ReactNode } from 'react'; import { type DataTestId, type MaskingProps, type StylingProps } from '@dynatrace/strato-components/core'; import { type FilterItemValues, type PinnedState } from './types/shared-filter-types.js'; /** * Props for the Filter component. * @public */ export interface BaseFilterBarProps extends StylingProps, DataTestId, MaskingProps { /** Handler that is called when the value of the sub-filter changes. */ onFilterChange: (value: FilterItemValues) => void; /** * All sub-filters connected to this filter. * Only components compatible with FilterItemProps are supported! */ children: ReactNode; /** The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id). */ id?: string; /** Defines if the labels are shown for the filter item. If set to false the label will be placed as aria-label instead. It can be overwritten for a single filter item by setting the showLabel-prop of the item as well. */ showLabels?: boolean; } /** * @public */ export interface ControlledFilterBarProps { /** The current pinned state of the item. */ pinnedState: PinnedState; /** Handler that is called when the pinned state changes. */ onPinnedStateChange: (newState: PinnedState, changedItems: Array) => void; /** Determines if a filter item is removable and its initial pinning state. */ defaultPinnedState?: never; } /** * @public */ export interface UncontrolledFilterBarProps { /** The current pinned state of the item. */ pinnedState?: never; /** Handler that is called when the pinned state changes. */ onPinnedStateChange?: (newState: PinnedState, changedItems: Key[]) => void; /** * Determines if a filter item is removable and its initial pinning state. * @defaultValue 'pinned' */ defaultPinnedState?: PinnedState; } /** * @public */ export type FilterBarProps = (ControlledFilterBarProps | UncontrolledFilterBarProps) & BaseFilterBarProps; /** * Use the `FilterBar` to filter a set of data based on * one or several criteria determined by the user. * The component allows you to add various form elements as filter controls. * @public */ export declare const FilterBar: ((props: FilterBarProps & import("react").RefAttributes) => React.ReactElement | null) & { Item: { (props: import("./Item.js").FilterBarItemProps): import("react/jsx-runtime.js").JSX.Element; displayName: string; }; ResetButton: (props: import("./ResetButton.js").ResetButtonProps & import("react").RefAttributes) => React.ReactElement | null; };