
import { FieldBaseProps } from "../../../shared/form.js";
import "../../../shared/index.js";
import "../../content/Item/index.js";
import { CubeItemProps } from "../../content/Item/Item.js";
import { CubeItemButtonProps } from "../../actions/ItemButton/ItemButton.js";
import "../../actions/index.js";
import { ListBox } from "../ListBox/ListBox.js";
import "../ListBox/index.js";
import { CubeFilterListBoxProps } from "../FilterListBox/FilterListBox.js";
import { BasePropsWithoutChildren, BaseStyleProps, ColorStyleProps, OuterStyleProps, Styles } from "@tenphi/tasty";
import { ForwardedRef, ReactElement, ReactNode, RefObject } from "react";
import { ListState, Section } from "react-stately";

//#region src/components/fields/FilterPicker/FilterPicker.d.ts
interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>, 'size' | 'tooltip' | 'shape'>, Omit<CubeItemProps, 'children' | 'size'>, BasePropsWithoutChildren, BaseStyleProps, OuterStyleProps, ColorStyleProps, Omit<FieldBaseProps, 'tooltip'>, Pick<CubeItemButtonProps, 'type' | 'theme' | 'icon' | 'rightIcon' | 'prefix' | 'suffix' | 'hotkeys' | 'shape'> {
  /** Placeholder text when no selection is made */
  placeholder?: string;
  /** Size of the picker component */
  size?: 'small' | 'medium' | 'large';
  /** Custom styles for the list box popover */
  listBoxStyles?: Styles;
  /** Custom styles for the popover container */
  popoverStyles?: Styles;
  /** Custom styles for the trigger button */
  triggerStyles?: Styles;
  /** Whether to show checkboxes for multiple selection mode */
  isCheckable?: boolean;
  /** Whether to flip the popover placement */
  shouldFlip?: boolean;
  /** Minimum padding in pixels between the popover and viewport edges */
  containerPadding?: number;
  /** Tooltip for the trigger button (separate from field tooltip) */
  triggerTooltip?: CubeItemProps['tooltip'];
  /** Description for the trigger button (separate from field description) */
  triggerDescription?: CubeItemProps['description'];
  /**
   * Custom renderer for the summary shown inside the trigger when there is a selection.
   *
   * For `selectionMode="multiple"` the function receives:
   *  - `selectedLabels`: array of labels of the selected items.
   *  - `selectedKeys`: array of keys of the selected items or "all".
   *
   * For `selectionMode="single"` the function receives:
   *  - `selectedLabel`: label of the selected item.
   *  - `selectedKey`: key of the selected item.
   *
   * The function should return a `ReactNode` that will be rendered inside the trigger.
   * Set to `false` to hide the summary text completely.
   */
  renderSummary?: ((args: {
    selectedLabels?: string[];
    selectedKeys?: 'all' | (string | number)[];
    selectedLabel?: string;
    selectedKey?: string | number | null;
    selectionMode?: 'single' | 'multiple';
  }) => ReactNode) | false;
  /** Ref to access internal ListBox state (from FilterListBox) */
  listStateRef?: RefObject<ListState<T>>;
  /** Additional modifiers for styling the FilterPicker */
  mods?: Record<string, boolean>;
  /** Whether the filter picker is clearable using a clear button in the rightIcon slot */
  isClearable?: boolean;
  /** Callback called when the clear button is pressed */
  onClear?: () => void;
  /**
   * Sort selected items to the top when the popover opens.
   * Only works when using the `items` prop (data-driven mode).
   * Ignored when using JSX children.
   * @default true when items are provided, false when using JSX children
   */
  sortSelectedToTop?: boolean;
  /** Callback called when the popover open state changes */
  onOpenChange?: (isOpen: boolean) => void;
}
declare const FilterPicker: (<T>(props: CubeFilterPickerProps<T> & {
  ref?: ForwardedRef<HTMLElement>;
}) => ReactElement) & {
  Item: typeof ListBox.Item;
  Section: typeof Section;
};
//#endregion
export { CubeFilterPickerProps, FilterPicker };
//# sourceMappingURL=FilterPicker.d.ts.map