import { FCWithSlotMarker } from "../utils/types/Slots.js"; import { DistributiveOmit } from "../utils/modern-polymorphic.js"; import React from "react"; import { Icon } from "@primer/octicons-react"; //#region src/TreeView/TreeView.d.ts type TreeViewProps = { 'aria-label'?: React.AriaAttributes['aria-label']; 'aria-labelledby'?: React.AriaAttributes['aria-labelledby']; children: React.ReactNode; flat?: boolean; truncate?: boolean; className?: string; style?: React.CSSProperties; }; type TreeViewSecondaryActions = { label: string; onClick: () => void; icon: Icon; count?: number | string; className?: string; }; type TreeViewItemBaseProps = { 'aria-label'?: React.AriaAttributes['aria-label']; 'aria-labelledby'?: React.AriaAttributes['aria-labelledby']; id: string; children: React.ReactNode; containIntrinsicSize?: string; current?: boolean; defaultExpanded?: boolean; expanded?: boolean | null; onExpandedChange?: (expanded: boolean) => void; onSelect?: (event: React.MouseEvent | React.KeyboardEvent) => void; className?: string; secondaryActions?: TreeViewSecondaryActions[]; }; type TreeViewItemProps = DistributiveOmit, 'as' | 'onSelect'> & TreeViewItemBaseProps & { as?: As; }; type SubTreeState = 'initial' | 'loading' | 'done' | 'error'; type TreeViewSubTreeProps = { children?: React.ReactNode; state?: SubTreeState; /** * Display a skeleton loading state with the specified count of items */ count?: number; 'aria-label'?: string; }; type TreeViewVisualProps = { children: React.ReactNode | ((props: { isExpanded: boolean; }) => React.ReactNode); label?: string; }; type TreeViewErrorDialogProps = { children: React.ReactNode; title?: string; onRetry?: () => void; onDismiss?: () => void; }; declare const TreeView: React.FC & { Item: ((props: DistributiveOmit extends As ? "li" : As>>, "as" | "onSelect"> & TreeViewItemBaseProps & { as?: As | undefined; } & React.RefAttributes) => React.ReactNode) & { displayName: string; }; SubTree: FCWithSlotMarker; LeadingAction: React.FC; LeadingVisual: React.FC; TrailingVisual: React.FC; DirectoryIcon: () => React.JSX.Element; ErrorDialog: React.FC; }; //#endregion export { SubTreeState, TreeView, TreeViewErrorDialogProps, TreeViewItemProps, TreeViewProps, TreeViewSecondaryActions, TreeViewSubTreeProps, TreeViewVisualProps };