/**
 * @file DropdownMenu.tsx
 * @input Uses React, StyleX, usePopover, Button, Icon, useListFocus
 * @output Exports DropdownMenu component
 * @position Core implementation; consumed by index.ts
 *
 * Supports two modes with a single keyboard/focus path:
 * - **Data-driven**: pass `items` array (converted to components internally)
 * - **Compound-component**: pass JSX children directly
 *
 * Both modes use useListFocus for DOM-based keyboard navigation.
 *
 * SYNC: When modified, update these files to stay in sync:
 * - /packages/core/src/DropdownMenu/DropdownMenu.doc.mjs
 * - /packages/core/src/DropdownMenu/DropdownMenu.test.tsx
 * - /packages/core/src/DropdownMenu/index.ts
 * - /apps/storybook/stories/DropdownMenu.stories.tsx
 * - /packages/cli/assets/templates/blocks/components/DropdownMenu/ (showcase blocks)
 */
import React, { type ReactNode } from 'react';
import { type ButtonProps } from '../Button';
import type { DropdownMenuItemProps } from './DropdownMenuItem';
import type { LayerAlignment, LayerPlacement } from '../Layer/useLayer';
import type { BaseProps } from '../BaseProps';
/**
 * Data-mode shape for one menu row.
 *
 * The item fields are sourced from `DropdownMenuItemProps` — data mode renders
 * through `DropdownMenuItem`, so the two APIs describe the same thing and must
 * not drift. Only the fields listed here are part of the data API; add a key to
 * the `Pick` to expose more of the item's props to `items`.
 */
export interface DropdownMenuItemData extends Pick<DropdownMenuItemProps, 'icon' | 'onClick' | 'isDisabled' | 'variant'> {
    /**
     * Primary label text. Narrowed to `string` from the item's `ReactNode`:
     * data mode derives each row's React key from the label.
     */
    label: string;
    /**
     * Nested submenu entries. When present, this row becomes a submenu (a
     * flyout revealing `items`) instead of a leaf action — no separate item
     * "type" is needed. Data-mode parity for the compound DropdownMenuSubMenu API.
     */
    items?: DropdownMenuOption[];
}
export interface DropdownMenuDivider {
    type: 'divider';
}
export interface DropdownMenuSection {
    type: 'section';
    title?: string;
    items: DropdownMenuItemData[];
}
export type DropdownMenuOption = DropdownMenuItemData | DropdownMenuDivider | DropdownMenuSection;
export type DropdownMenuButtonProps = Omit<ButtonProps, 'onClick'>;
interface DropdownMenuBaseProps extends BaseProps {
    button?: DropdownMenuButtonProps;
    isMenuOpen?: boolean;
    onOpenChange?: (isOpen: boolean) => void;
    menuWidth?: number | string;
    onClick?: () => void;
    hasChevron?: boolean;
    /**
     * Position placement relative to the trigger.
     * Uses the same placement values as other Astryx layer-based components.
     * @default 'below'
     */
    placement?: LayerPlacement;
    /**
     * Alignment along the placement axis.
     * Uses the same alignment values as other Astryx layer-based components.
     * @default 'start'
     */
    alignment?: LayerAlignment;
    'data-testid'?: string;
}
interface DropdownMenuDataProps extends DropdownMenuBaseProps {
    items: DropdownMenuOption[];
    children?: undefined;
}
interface DropdownMenuCompoundProps extends DropdownMenuBaseProps {
    items?: undefined;
    children: ReactNode;
}
export type DropdownMenuProps = DropdownMenuDataProps | DropdownMenuCompoundProps;
export declare function DropdownMenu({ button: buttonFromProps, isMenuOpen: controlledIsOpen, onOpenChange, menuWidth, onClick, hasChevron, placement, alignment, className, style, xstyle, 'data-testid': testId, ...props }: DropdownMenuProps): React.JSX.Element;
export declare namespace DropdownMenu {
    var displayName: string;
}
export {};
//# sourceMappingURL=DropdownMenu.d.ts.map