import type { ElementType } from "react"; import type { CheckboxOptions } from "../checkbox/checkbox.tsx"; import type { Props } from "../utils/types.ts"; import type { MenuItemOptions } from "./menu-item.tsx"; import type { MenuStore } from "./menu-store.ts"; declare const TagName = "div"; type TagName = typeof TagName; /** * Returns props to create a `MenuItemCheckbox` component. * @see https://ariakit.com/components/menu * @example * ```jsx * const store = useMenuStore({ defaultValues: { apple: false } }); * const props = useMenuItemCheckbox({ store, name: "apple" }); * Fruits * * Apple * * ``` */ export declare const useMenuItemCheckbox: import("../utils/types.ts").Hook<"div", MenuItemCheckboxOptions<"div">>; /** * Renders a [`menuitemcheckbox`](https://w3c.github.io/aria/#menuitemcheckbox) * element within a [`Menu`](https://ariakit.com/reference/menu) component. The * [`name`](https://ariakit.com/reference/menu-item-checkbox#name) prop must be * provided to identify the field in the * [`values`](https://ariakit.com/reference/menu-provider#values) state. * * A [`MenuItemCheck`](https://ariakit.com/reference/menu-item-check) can be * used to render a checkmark inside this component. * @see https://ariakit.com/components/menu * @example * The [`name`](https://ariakit.com/reference/menu-item-checkbox#name) prop can * refer to a single value in the state: * ```jsx {4-7} * * Chrome * * * * Warn Before Quitting * * * * ``` * @example * Or it can refer to an array of values, in which case the * [`value`](https://ariakit.com/reference/menu-item-checkbox#value) prop must * be provided: * ```jsx {4-9} * * Watch * * * Issues * * * Pull Requests * * * * ``` */ export declare const MenuItemCheckbox: (props: MenuItemCheckboxProps) => import("react").ReactElement>; export interface MenuItemCheckboxOptions extends MenuItemOptions, Omit, "store"> { /** * Object returned by the * [`useMenuStore`](https://ariakit.com/reference/use-menu-store) hook. If not * provided, the closest [`Menu`](https://ariakit.com/reference/menu) or * [`MenuProvider`](https://ariakit.com/reference/menu-provider) components' * context will be used. */ store?: MenuStore; /** * The name of the field in the * [`values`](https://ariakit.com/reference/menu-provider#values) state. * * Live examples: * - [MenuItemCheckbox](https://ariakit.com/examples/menu-item-checkbox) */ name: string; /** * The controlled checked state of the element. It will set the menu * [`values`](https://ariakit.com/reference/menu-provider#values) state if * provided. */ checked?: boolean; /** * The default checked state of the element. It will set the default value in * the menu [`values`](https://ariakit.com/reference/menu-provider#values) * state if provided. */ defaultChecked?: boolean; /** * @default false */ hideOnClick?: MenuItemOptions["hideOnClick"]; } export type MenuItemCheckboxProps = Props>; export {};