import { type ComponentProps, type ReactNode } from 'react';
import { type GDSComponentProps } from '@graphprotocol/gds-css';
import { type OptionValue } from '../utils/index.ts';
import { type AddonValue } from './base/Addon.tsx';
import { type ButtonOrLinkProps } from './base/ButtonOrLink.tsx';
import { type RenderProp } from './base/Render.tsx';
import { MenuMeta, type MenuItemMeta } from './Menu.meta.js';
type MenuItemType = 'plain' | 'checkbox' | 'radio';
declare namespace GroupProps {
    interface CommonProps {
        label?: ReactNode | undefined;
    }
    interface NonRadioProps extends CommonProps {
        type?: Exclude<MenuItemType, 'radio'> | undefined;
        value?: undefined;
        defaultValue?: undefined;
        onChange?: undefined;
    }
    interface RadioProps<T extends OptionValue> extends CommonProps {
        type: 'radio';
        value?: T | undefined;
        defaultValue?: T | undefined;
        onChange?: ((value: T) => void) | undefined;
    }
}
export declare namespace MenuProps {
    interface HTMLProps extends Omit<ComponentProps<'div'>, 'defaultValue' | 'onChange'> {
    }
    interface OwnProps {
        /**
         * Element that opens the menu when clicked or hovered (depending on `triggerMode`), or a
         * function that returns such an element. If not provided, the menu is rendered inline rather
         * than as a floating overlay, and all positioning props are ignored (`side`, `gap`, `align`,
         * `alignOffset`, `matchTriggerWidth`, and `matchTriggerHeight`).
         */
        trigger?: RenderProp<{
            open: boolean;
            setOpen: (open: boolean) => void;
            openMenu: () => void;
        }> | undefined;
        /**
         * Controls how the menu is opened when `trigger` is an element. Ignored if `trigger` is a
         * function, since you can fully customize the interaction that opens the menu (e.g.
         * `trigger={(props, { openMenu }) => <button {...props} onMouseEnter={openMenu} />}`). Also
         * ignored for submenus, which always open on hover.
         *
         * @default 'click'
         */
        triggerMode?: 'click' | 'hover' | undefined;
        /** Defaults to `true` if `trigger` is not provided, or `undefined` otherwise. */
        open?: boolean | undefined;
        defaultOpen?: boolean | undefined;
        onOpenChange?: ((open: boolean) => void) | undefined;
        header?: ReactNode | undefined;
        footer?: ReactNode | undefined;
    }
    interface CommonProps extends HTMLProps, OwnProps, GDSComponentProps<typeof MenuMeta> {
    }
    interface NonRadioProps extends CommonProps, GroupProps.NonRadioProps {
    }
    interface RadioProps<T extends OptionValue> extends CommonProps, GroupProps.RadioProps<T> {
    }
}
export type MenuProps<T extends OptionValue = OptionValue> = MenuProps.NonRadioProps | MenuProps.RadioProps<T>;
export declare function MenuRoot<T extends OptionValue>({ ref: passedRef, trigger, triggerMode, side, gap, align, alignOffset, matchTriggerWidth, matchTriggerHeight, open: controlledOpen, defaultOpen, onOpenChange, header, footer, label, type, value, defaultValue, onChange, className, style, children, ...props }: MenuProps<T>): import("react/jsx-runtime").JSX.Element;
export declare namespace MenuRoot {
    var displayName: string;
}
export declare namespace MenuGroupProps {
    interface HTMLProps extends Omit<ComponentProps<'div'>, 'defaultValue' | 'onChange'> {
    }
    interface NonRadioProps extends HTMLProps, GroupProps.NonRadioProps {
    }
    interface RadioProps<T extends OptionValue> extends HTMLProps, GroupProps.RadioProps<T> {
    }
}
export type MenuGroupProps<T extends OptionValue = OptionValue> = MenuGroupProps.NonRadioProps | MenuGroupProps.RadioProps<T>;
export declare function MenuGroup<T extends OptionValue>({ label, type, value, defaultValue, onChange, className, children, ...props }: MenuGroupProps<T>): import("react/jsx-runtime").JSX.Element;
export declare namespace MenuGroup {
    var displayName: string;
}
export declare namespace MenuItemProps {
    interface HTMLProps extends Omit<ComponentProps<'button'>, 'defaultChecked' | 'defaultValue' | 'onChange' | 'type' | 'value'> {
    }
    interface OwnProps {
        addonBefore?: AddonValue | undefined;
        addonAfter?: AddonValue | undefined;
        disabled?: boolean | undefined;
    }
    interface CommonProps extends HTMLProps, OwnProps, GDSComponentProps<typeof MenuItemMeta> {
    }
    interface PlainProps extends CommonProps {
        type?: 'plain' | undefined;
        variant?: 'default' | 'danger' | undefined;
        loading?: boolean | undefined;
        href?: ButtonOrLinkProps['href'] | undefined;
        target?: ButtonOrLinkProps['target'] | undefined;
        checked?: undefined;
        defaultChecked?: undefined;
        onChange?: undefined;
        value?: undefined;
    }
    interface CheckboxProps extends CommonProps {
        type?: 'checkbox' | undefined;
        checked?: boolean | 'indeterminate' | undefined;
        defaultChecked?: boolean | 'indeterminate' | undefined;
        onChange?: ((checked: boolean) => void) | undefined;
        variant?: undefined;
        loading?: undefined;
        href?: undefined;
        target?: undefined;
        value?: undefined;
    }
    interface RadioProps<T extends OptionValue = OptionValue> extends CommonProps {
        type?: 'radio' | undefined;
        value?: T | undefined;
        variant?: undefined;
        loading?: undefined;
        href?: undefined;
        target?: undefined;
        checked?: undefined;
        defaultChecked?: undefined;
        onChange?: undefined;
    }
}
export type MenuItemProps<T extends OptionValue = OptionValue> = MenuItemProps.PlainProps | MenuItemProps.CheckboxProps | MenuItemProps.RadioProps<T>;
export declare function MenuItem<T extends OptionValue>({ ref: passedRef, type: passedType, addonBefore: passedAddonBefore, addonAfter: passedAddonAfter, variant, loading, href, target, checked, defaultChecked, onChange, value: passedValue, disabled: passedDisabled, className, children, ...props }: MenuItemProps<T>): import("react/jsx-runtime").JSX.Element;
export declare namespace MenuItem {
    var displayName: string;
}
export interface MenuSearchProps extends Omit<ComponentProps<'input'>, 'onChange' | 'children'> {
    /** @default 'Search' */
    placeholder?: string | undefined;
    value?: string | undefined;
    defaultValue?: string | undefined;
    onChange?: ((value: string) => void) | undefined;
}
export declare function MenuSearch({ ref: passedRef, placeholder: passedPlaceholder, value: controlledValue, defaultValue, onChange, className, ...props }: MenuSearchProps): import("react/jsx-runtime").JSX.Element;
export declare namespace MenuSearch {
    var displayName: string;
}
export {};
//# sourceMappingURL=Menu.parts.d.ts.map