import { RenderResult } from '@dojo/framework/core/interfaces';
import { ThemeProperties } from '../middleware/theme';
export interface MenuItemProperties {
    /** Callback used when the item is clicked */
    onSelect(): void;
    /** Property to set the active state of the item, indicates it's the current keyboard / mouse navigation target */
    active?: boolean;
    /** Callback used when the item wants to request it be made active, to example on pointer move */
    onRequestActive(): void;
    /** Property to set the disabled state of the item */
    disabled?: boolean;
    /** The id to apply to this widget top level for a11y */
    widgetId: string;
}
export declare const MenuItem: import("@dojo/framework/core/interfaces").DefaultChildrenWNodeFactory<{
    properties: MenuItemProperties & import("@dojo/framework/core/interfaces").WidgetProperties & {
        variant?: "default" | "inherit" | undefined;
    } & import("@dojo/framework/core/middleware/theme").ThemeProperties;
    children: import("@dojo/framework/core/interfaces").DNode<any>[];
}>;
export interface ListItemProperties {
    /** Callback used when the item is clicked */
    onSelect(): void;
    /** Property to set the selected state of the item */
    selected?: boolean;
    /** Property to set the active state of the item, indicates it's the current keyboard / mouse navigation target */
    active?: boolean;
    /** Callback used when the item wants to request it be made active, to example on pointer move */
    onRequestActive(): void;
    /** Property to set the disabled state of the item */
    disabled?: boolean;
    /** The id to apply to this widget top level for a11y */
    widgetId: string;
    /** Determines if this item can be reordered */
    draggable?: boolean;
    /** Determines if this item is actively being dragged */
    dragged?: boolean;
    /** Determines if this item is visually shifted down due to DnD */
    movedUp?: boolean;
    /** Determines if this item is visually shifted down due to DnD */
    movedDown?: boolean;
    /** Called when dragging begins */
    onDragStart?: (event: DragEvent) => void;
    /** Called when dragging ends */
    onDragEnd?: (event: DragEvent) => void;
    /** Called when over a dragged item */
    onDragOver?: (event: DragEvent) => void;
    /** Called when a holistic drag is complete */
    onDrop?: (event: DragEvent) => void;
    /** Determines if this item is visually collapsed during DnD */
    collapsed?: boolean;
}
export interface ListItemChildren {
    /** Icon or avatar to place before the primary content */
    leading?: RenderResult;
    /** The main content of the item, typically text */
    primary?: RenderResult;
    /** Icon or text to place after the primary content */
    trailing?: RenderResult;
}
export declare const ListItem: import("@dojo/framework/core/interfaces").OptionalWNodeFactory<{
    properties: ListItemProperties & import("@dojo/framework/core/interfaces").WidgetProperties & {
        variant?: "default" | "inherit" | undefined;
    } & import("@dojo/framework/core/middleware/theme").ThemeProperties;
    children: string | number | boolean | import("@dojo/framework/core/interfaces").VNode | import("@dojo/framework/core/interfaces").WNode<any> | import("@dojo/framework/core/interfaces").DNode<any>[] | RenderResult[] | ListItemChildren;
}>;
export declare type ListOption = {
    value: string;
    label: string;
    disabled?: boolean;
    divider?: boolean;
};
export interface ListProperties {
    /** Determines if this list can be reordered */
    draggable?: boolean;
    /** Called when a draggable is dropped */
    onMove?: (from: number, to: number) => void;
    /** The initial selected value */
    initialValue?: string;
    /** Controlled value property */
    value?: string;
    /** Callback called when user selects a value */
    onValue(value: ListOption): void;
    /** Called to request that the menu be closed */
    onRequestClose?(): void;
    /** Optional callback, when passed, the widget will no longer control it's own active index / keyboard navigation */
    onActiveIndexChange?(index: number): void;
    /** Optional property to set the activeIndex when it is being controlled externally */
    activeIndex?: number;
    /** Determines if the widget can be focused or not. If the active index is controlled from elsewhere you may wish to stop the menu being focused and receiving keyboard events */
    focusable?: boolean;
    /** Callback called when menu root is focused */
    onFocus?(): void;
    /** Callback called when menu root is blurred */
    onBlur?(): void;
    /** Property to determine how many items to render. Not passing a number will render all results */
    itemsInView?: number | 'fill';
    /** Property to determine if this list is being used as a menu, changes a11y and item type */
    menu?: boolean;
    /** The id to be applied to the root of this widget, if not passed, one will be generated for a11y reasons */
    widgetId?: string;
    /** Callback to determine if a list item is disabled. If not provided, ListOption.disabled will be used */
    disabled?: (item: ListOption) => boolean;
    /** Specifies if the list height should by fixed to the height of the items in view */
    height?: 'auto' | 'fixed';
}
export interface ListChildren {
    /** Custom renderer for item contents */
    (item: ItemRendererProperties, properties: ListItemProperties & MenuItemProperties & ThemeProperties): RenderResult;
}
export interface ItemRendererProperties {
    active: boolean;
    disabled: boolean;
    label: string;
    selected: boolean;
    value: string;
}
export declare const List: import("@dojo/framework/core/interfaces").OptionalWNodeFactory<{
    properties: ListProperties & import("@dojo/framework/core/interfaces").WidgetProperties & {
        variant?: "default" | "inherit" | undefined;
    } & import("@dojo/framework/core/middleware/theme").ThemeProperties & import("@dojo/framework/core/middleware/resources").ResourceProperties<ListOption, undefined> & import("@dojo/framework/core/interfaces").FocusProperties;
    children: ListChildren;
}>;
export default List;
