import * as React from "react"; import { StyleProp, ViewStyle } from "react-native"; import { Key } from "./common"; declare type Selected = Key; export interface FallbackOptionType { id: Key; label?: string; name?: string; } export interface CommonControlsProps { data: OptionType[]; allowToggle?: boolean; style?: Partial<{ wrapper: StyleProp; itemWrapper: StyleProp; }>; ripple?: boolean; testIdPrefix?: string; keyExtractor?: (item: OptionType) => Key; renderLabel?: (args: { item: OptionType; }) => React.ReactNode; disabled?: boolean | Key[]; renderElement?: (args: { item: OptionType; isSelected: boolean; renderLabel?: (args: { item: OptionType; }) => React.ReactNode; }, props: ControlsProps) => React.ReactNode; } export interface RadioControlsProps extends CommonControlsProps { type?: "radio"; selected?: Selected; onChange: (args: { selected?: Selected; }, props: RadioControlsProps) => void; } export interface CheckboxControlsProps extends CommonControlsProps { type: "checkbox"; selected?: Selected[]; onChange: (args: { selected: Selected[]; }, props: CheckboxControlsProps) => void; } export declare type ControlsProps = RadioControlsProps | CheckboxControlsProps; export {};