import type React from 'react'; /** Option ids are whatever the consumer keys its rows by — string (UUID / enum value) or numeric row id. */ export type SelectableOptionId = string | number; export interface SelectableOption { id: Id; name: string; displayName?: string; description?: string; isActive?: boolean; createdAt?: string; updatedAt?: string; icon?: React.ReactNode; color?: string; disabled?: boolean; disabledReason?: string; section?: string; } export interface SectionDefinition { id: string; label: string; icon?: React.ReactNode; description?: string; } /** SERVER-SIDE search: the selector renders the input; the PARENT owns the * query state and re-fetches `options` (never a client-side .filter of a * pre-fetched list). While `isLoading`, the input stays mounted (typing * must not lose focus to a skeleton swap). */ export interface PushButtonSelectorSearch { value: string; onChange: (value: string) => void; placeholder?: string; ariaLabel?: string; } /** Lazy paging: the option list becomes a FIXED-HEIGHT scroll viewport with * an IntersectionObserver sentinel near the bottom — the selector calls * `onLoadMore` as the user scrolls; the parent appends to `options`. */ export interface PushButtonSelectorLazyLoad { hasMore: boolean; isFetchingMore: boolean; onLoadMore: () => void; /** CSS height of the scroll viewport (default '336px' ≈ 6 rows). */ maxHeight?: string; } interface PushButtonSelectorProps { options: SelectableOption[]; selectedIds: Id[]; onSelectionChange: (selectedIds: Id[]) => void; multiSelect?: boolean; title?: string; helpText?: string; className?: string; selectionSummary?: boolean; optional?: boolean; isLoading?: boolean; error?: string | null; skeletonCount?: number; sections?: SectionDefinition[]; /** Built-in server-side search input (see PushButtonSelectorSearch). */ search?: PushButtonSelectorSearch; /** Built-in fixed-height scroll + infinite paging (see PushButtonSelectorLazyLoad). */ lazyLoad?: PushButtonSelectorLazyLoad; /** Rendered inside the list when `options` is empty and not loading. */ emptyMessage?: React.ReactNode; /** Rendered under the list (result counts, hints). */ footer?: React.ReactNode; } export declare function PushButtonSelector({ options, selectedIds, onSelectionChange, multiSelect, title, helpText, className, selectionSummary, optional, isLoading, error, skeletonCount, sections, search, lazyLoad, emptyMessage, footer, }: PushButtonSelectorProps): React.JSX.Element; export {}; //# sourceMappingURL=push-button-selector.d.ts.map