import { Component } from 'react'; import type { DropdownProps, DropdownOption } from '../../../../components/common/Dropdown'; export interface GenericChildrenSwitcherProps { items?: T[]; options: DropdownOption[]; label?: string; renderDropdown: (props: DropdownProps) => JSX.Element; children: (activeItem: T) => JSX.Element; } export interface GenericChildrenSwitcherState { activeItemIdx: number; } /** * TODO: Refactor this component: * Implement rendering dropdown/label directly in this component * Accept as a parameter mapper-function for building dropdown option labels */ export declare class GenericChildrenSwitcher extends Component, GenericChildrenSwitcherState> { constructor(props: GenericChildrenSwitcherProps); switchItem: ({ idx }: DropdownOption) => void; render(): JSX.Element | null; }