import * as React from 'react'; import { View } from 'react-native'; import type { ZestUIComponentProps, Orientation } from '../types'; import type { ZestChangeEventDetails } from '../utils/createChangeEventDetails'; import type { REASONS } from '../utils/reasons'; /** * Provides a shared state to a series of toggle buttons. * Renders a ``. */ export declare function ToggleGroup(componentProps: ToggleGroup.Props): React.JSX.Element; export interface ToggleGroupState { /** * Whether the component should ignore user interaction. */ disabled: boolean; /** * When `false` only one item in the group can be pressed. If any item in * the group becomes pressed, the others will become unpressed. * When `true` multiple items can be pressed. */ multiple: boolean; /** * The orientation of the toggle group. */ orientation: Orientation; } export interface ToggleGroupProps extends ZestUIComponentProps { /** * The pressed state of the toggle group represented by an array of * the values of all pressed toggle buttons. * This is the controlled counterpart of `defaultValue`. */ value?: readonly Value[] | undefined; /** * The pressed state of the toggle group represented by an array of * the values of all pressed toggle buttons. * This is the uncontrolled counterpart of `value`. */ defaultValue?: readonly Value[] | undefined; /** * Callback fired when the pressed states of the toggle group changes. */ onValueChange?: ((groupValue: Value[], eventDetails: ToggleGroup.ChangeEventDetails) => void) | undefined; /** * Whether the toggle group should ignore user interaction. * @default false */ disabled?: boolean | undefined; /** * @default 'horizontal' */ orientation?: Orientation | undefined; /** * When `false` only one item in the group can be pressed. If any item in * the group becomes pressed, the others will become unpressed. * When `true` multiple items can be pressed. * @default false */ multiple?: boolean | undefined; } export type ToggleGroupChangeEventReason = typeof REASONS.none; export type ToggleGroupChangeEventDetails = ZestChangeEventDetails; export declare namespace ToggleGroup { type State = ToggleGroupState; type Props = ToggleGroupProps; type ChangeEventReason = ToggleGroupChangeEventReason; type ChangeEventDetails = ToggleGroupChangeEventDetails; } //# sourceMappingURL=ToggleGroup.d.ts.map