import * as React from 'react'; import { Pressable } from 'react-native'; import type { ZestUIComponentProps } from '../types'; import { type ZestChangeEventDetails } from '../utils/createChangeEventDetails'; import { REASONS } from '../utils/reasons'; /** * A two-state button that can be on or off. * Renders a ``. */ export declare function Toggle(componentProps: Toggle.Props): React.ReactElement>; export interface ToggleState { /** * Whether the toggle is currently pressed. */ pressed: boolean; /** * Whether the toggle should ignore user interaction. */ disabled: boolean; } export interface ToggleProps extends Omit, 'onPress'> { /** * Whether the toggle button is currently pressed. * This is the controlled counterpart of `defaultPressed`. */ pressed?: boolean | undefined; /** * Whether the toggle button is currently pressed. * This is the uncontrolled counterpart of `pressed`. * @default false */ defaultPressed?: boolean | undefined; /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean | undefined; /** * Callback fired when the pressed state is changed. */ onPressedChange?: ((pressed: boolean, eventDetails: Toggle.ChangeEventDetails) => void) | undefined; /** * A unique string that identifies the toggle when used * inside a toggle group. */ value?: Value | undefined; } export type ToggleChangeEventReason = typeof REASONS.none; export type ToggleChangeEventDetails = ZestChangeEventDetails; export declare namespace Toggle { type State = ToggleState; type Props = ToggleProps; type ChangeEventReason = ToggleChangeEventReason; type ChangeEventDetails = ToggleChangeEventDetails; } //# sourceMappingURL=Toggle.d.ts.map