import * as React from "react"; import { StyleProp, ViewStyle } from "react-native"; import { Key } from "./common"; export interface FallbackOptionType { id: Key; label?: string; name?: string; } declare type Selected = Key; export interface CommonOptionProps { options: OptionType[]; width?: string | number; testIdPrefix?: string; keyExtractor: (item: OptionType) => Key; rowLabelExtractor?: (item: OptionType) => React.ReactNode; rowRenderElement?: (args: { item: OptionType; isSelected: boolean; }, props: OptionsProps) => React.ReactNode; styles?: Partial<{ optionWrapper: StyleProp; row: StyleProp; }>; } export interface RadioOptionProps extends CommonOptionProps { type?: "radio"; onSelect: (suggestion: OptionType) => void; selected?: Selected; } export interface CheckboxOptionProps extends CommonOptionProps { type: "checkbox"; onSelect: (suggestion: OptionType[]) => void; selected?: Selected[]; } export declare type OptionsProps = RadioOptionProps | CheckboxOptionProps; export {};