import { ReactNode } from 'react'; import { BaseItemType, BaseSectionType, InheritedFromListItem } from './baseItemSectionType.types'; export declare const ACTION_TYPES: { readonly redirect: "redirect"; readonly custom: "custom"; readonly searchBy: "searchBy"; readonly searchIn: "searchIn"; }; type BasicAction = Omit & { sectionId?: BaseSectionType['id']; id: string | number; text: ReactNode; icon?: ReactNode; }; type RedirectAction = BasicAction & { actionType: typeof ACTION_TYPES.redirect; }; type CustomAction = BasicAction & { actionType: typeof ACTION_TYPES.custom; onClick: (action: Action) => void; }; export type SearchByConfig = { actionType: typeof ACTION_TYPES.searchBy; sectionTitle?: ReactNode; searchParams: SearchByParamConfig[]; onSearchByParamClick?: (searchByParam: SearchByParamConfig) => void; }; export type SearchByParamConfig = { searchLabel?: ReactNode; paramKeyLabel?: ReactNode; paramListLabel: ReactNode; paramKey: string; icon?: ReactNode; }; export type SearchByAction = BasicAction & SearchByConfig; export type SearchInConfig = { actionType: typeof ACTION_TYPES.searchIn; loadItemsSectionId?: BaseSectionType['id']; searchInSectionId?: BaseSectionType['id']; renderSearchInValueText: (item: BaseItemType) => ReactNode; onSearchInItemClick?: (item: BaseItemType) => void; }; export type SearchInAction = BasicAction & SearchInConfig; export declare const CONTEXT_AWARE_ACTIONS: readonly ["searchBy", "searchIn"]; export type ContextAwareActionType = (typeof CONTEXT_AWARE_ACTIONS)[number]; export type Action = RedirectAction | CustomAction | SearchByAction | SearchInAction; export type ContextAwareAction = Extract; export {};