import { type ReactNode, type Ref } from "react";
import { Button as PrimitiveButton } from "src/primitives/Button";
import { DropdownMenuContent, DropdownMenuItem as PrimitiveDropdownMenuItem } from "src/primitives/DropdownMenu";
import type { IconProp } from "src/lib/renderIcon";
export type DropdownPosition = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | "auto";
export type ButtonStyle = "primary" | "secondary" | "tertiary" | "text" | "danger" | "danger-text" | "link";
export type ButtonSize = "small" | "medium" | "large";
export type MenuItemButtonStyle = "default" | "danger";
export interface BaseTriggerProps {
    label?: string;
    icon?: IconProp;
    buttonStyle: ButtonStyle;
    buttonSize: ButtonSize;
    buttonProps?: Omit<React.ComponentProps<typeof PrimitiveButton>, "variant" | "size" | "disabled">;
    disabled: boolean;
    isOpen: boolean;
    onClick?: (e: React.MouseEvent) => void;
}
export interface DropdownProps {
    /** Text label displayed inside the trigger button. */
    label?: string;
    /** Icon rendered inside the trigger button. */
    icon?: IconProp;
    /** Visual style of the trigger button(s). */
    buttonStyle?: ButtonStyle;
    /** Size of the trigger button(s). */
    buttonSize?: ButtonSize;
    /** Extra props forwarded to the trigger button. In split-button mode, forwarded to the action button. */
    buttonProps?: Omit<React.ComponentProps<typeof PrimitiveButton>, "variant" | "size" | "disabled">;
    /** Custom trigger element. Overrides the default button trigger. */
    customTarget?: ReactNode | ((props: {
        isOpen: boolean;
    }) => ReactNode);
    /** Whether the dropdown is disabled. */
    disabled?: boolean;
    /** Dropdown menu content. */
    children?: ReactNode;
    /** Position of the dropdown menu relative to the trigger. */
    position?: DropdownPosition;
    /** Whether pressing Escape closes the dropdown. */
    closeOnEsc?: boolean;
    /** Whether selecting an item closes the dropdown. */
    closeOnSelect?: boolean;
    /** Whether clicking outside closes the dropdown. */
    closeOnOutsideClick?: boolean;
    /** Controlled open state. */
    isOpen?: boolean;
    /** Callback fired when the dropdown closes. */
    onClose?: () => void;
    /**
     * Callback fired when the trigger button is clicked.
     * When provided (without `customTarget`), renders a **split-button**:
     * a primary action button (fires `onClick`) paired with a separate
     * chevron that opens the dropdown menu.
     */
    onClick?: (e: React.MouseEvent) => void;
    /** Additional CSS class names for the trigger wrapper. */
    className?: string;
    /** Ref forwarded to the trigger button. In split-button mode, forwarded to the action button. */
    triggerRef?: Ref<HTMLButtonElement>;
    /** Extra props forwarded to the DropdownMenuContent. */
    dropdownProps?: Omit<React.ComponentProps<typeof DropdownMenuContent>, "side" | "align">;
}
export interface MenuItemButtonProps extends Omit<React.ComponentProps<typeof PrimitiveDropdownMenuItem>, "prefix" | "style" | "onClick"> {
    /** Highlight as active. */
    isActive?: boolean;
    /** Disable the menu item button. */
    isDisabled?: boolean;
    /** Visual style of the button. */
    style?: MenuItemButtonStyle;
    /** Content rendered before the label. */
    prefix?: ReactNode;
    /** Content rendered after the label. */
    suffix?: ReactNode;
    /** Internal route (renders as anchor). */
    to?: string;
    /** External link (renders as anchor). */
    href?: string;
    /** Callback fired when the item is selected. */
    onClick?: (e: Event) => void;
    /** Children / label text. */
    children?: ReactNode;
    /** Additional CSS class names. */
    className?: string;
}
export declare const DropdownContext: import("react").Context<{
    closeOnSelect: boolean;
}>;
