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 menu item that toggles a setting on and off. * Renders a ``. * * Unlike `Menu.Item`, `closeOnPress` defaults to `false`: ticking a box is * usually not the end of the interaction. */ export declare function MenuCheckboxItem(componentProps: MenuCheckboxItem.Props): React.JSX.Element; export interface MenuCheckboxItemState { /** * Whether the checkbox item is currently ticked. */ checked: boolean; /** * Whether the component should ignore user interaction. */ disabled: boolean; /** * Whether the item is currently pressed. */ pressed: boolean; /** * The item's index in the menu. */ index: number; } export interface MenuCheckboxItemProps extends ZestUIComponentProps { /** * Whether the checkbox item is currently ticked. * * To render an uncontrolled checkbox item, use the `defaultChecked` prop instead. */ checked?: boolean | undefined; /** * Whether the checkbox item is initially ticked. * * To render a controlled checkbox item, use the `checked` prop instead. * @default false */ defaultChecked?: boolean | undefined; /** * Event handler called when the checkbox item is ticked or unticked. */ onCheckedChange?: ((checked: boolean, eventDetails: MenuCheckboxItem.ChangeEventDetails) => void) | undefined; /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean | undefined; /** * Whether to close the menu when the item is pressed. * @default false */ closeOnPress?: boolean | undefined; /** * @deprecated Use `closeOnPress`. Kept as an alias for Base UI parity. */ closeOnClick?: boolean | undefined; } export type MenuCheckboxItemChangeEventReason = typeof REASONS.itemPress | typeof REASONS.none; export type MenuCheckboxItemChangeEventDetails = ZestChangeEventDetails; export declare namespace MenuCheckboxItem { type State = MenuCheckboxItemState; type Props = MenuCheckboxItemProps; type ChangeEventReason = MenuCheckboxItemChangeEventReason; type ChangeEventDetails = MenuCheckboxItemChangeEventDetails; } //# sourceMappingURL=MenuCheckboxItem.d.ts.map