import type { MouseEvent, KeyboardEvent, ReactNode } from 'react';
import type { Action, PropsWithDefaults } from '../../types';
import type { LinkProps } from '../Link';
import type { TreeProps, TreeNode } from './Tree';
export interface StandardTreeNode extends TreeNode {
    /** A set of nested tree nodes. */
    nodes?: StandardTreeNode[];
    /** The display text of the tree node. */
    label: string;
    /** Secondary text for the tree item, will be displayed below the label. */
    secondary?: string;
    /** The name of the Cosmos Icon to render as a visual, before the label. */
    icon?: string;
    /**
     * If true, the node's children will be displayed.
     * @default false
     */
    expanded?: boolean;
    /**
     * If true, the node will render a loading indicator in place of any children.
     * @default false
     */
    loading?: boolean;
    /** A set of actions attached to the node. */
    actions?: Action[];
    /** Click handler for the tree node. */
    onClick?: (id: TreeNode['id'], e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
    /** Callback function that if set will render a "Load more" button after all child nodes. */
    onLoadMore?: (id: TreeNode['id']) => void;
    /** URL or DOM id to navigate to. This will render the tree node as a link. */
    href?: string;
    /** Callback function that is run when the preview popover is interacted with. */
    onPreview?: LinkProps['onPreview'];
}
export interface StandardTreeProps extends TreeProps<StandardTreeNode> {
    /** The id of the currently active tree node. */
    currentNodeId?: TreeNode['id'];
    /** Callback function to render custom node content. */
    contentRenderer?: (node: StandardTreeNode) => ReactNode;
    /**
     * If true, a vertical line will render alongside nested nodes.
     * @default false
     */
    lined?: boolean;
    /** Callback function for click events on tree nodes. This will only be called on parent nodes if selectableParents is true. It will always be called on leaf nodes. */
    onNodeClick?: (id: TreeNode['id'], e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
    /** Callback function for when a tree node is focused. */
    onNodeFocus?: (id: TreeNode['id']) => void;
    /** Callback function for when a tree node is hovered. */
    onNodeHover?: (id: TreeNode['id'], e: MouseEvent<HTMLElement>) => void;
    /** Callback function for toggling tree nodes between expanded/collapsed states. This is only ever called on parent nodes. */
    onNodeToggle?: (id: TreeNode['id'], e?: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
    /** If set, will render a "Load more" button at the root of the tree. */
    onLoadMore?: () => void;
    /**
     * If true, parent tree nodes can be selected independently from being toggled expanded/collapsed.
     * @default true
     */
    selectableParents?: boolean;
}
export interface StandardTreeContextProps extends StandardTreeProps {
    firstNodeId?: TreeNode['id'];
    lastNodeId?: TreeNode['id'];
    focusedNodeId?: TreeNode['id'];
    changeFocusedNodeId: (id: TreeNode['id'], type?: 'up' | 'down' | 'left' | 'right') => void;
}
export type StandardTreePropsWithDefaults = PropsWithDefaults<StandardTreeContextProps, 'lined'>;
//# sourceMappingURL=StandardTree.types.d.ts.map