/**
*
* Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
import { type UniqueIdentifier } from '@dnd-kit/core';
import { type UseSortableArguments } from '@dnd-kit/sortable';
import { type FlattenedTreeItem, type ItemChangedReason, type TreeItemComponent } from './tree-view-types';
export interface TreeItemProps {
/** Number of child items */
childCount?: number;
/** Whether this is a clone item */
clone?: boolean;
/** Whether the item is collapsed */
collapsed?: boolean;
/** Depth of the item in the tree */
depth: number;
/** Whether interaction should be disabled */
shouldDisableInteraction?: boolean;
/** Whether this is an indicator item */
indicator?: boolean;
/** Width of the indentation */
indentationWidth: number;
/** The tree item data */
item: FlattenedTreeItem;
/** Whether this is the last item in its parent */
isLast: boolean;
/** Parent item of this item */
parent: FlattenedTreeItem | null;
/** Function to call when item is collapsed */
onCollapse?(id: UniqueIdentifier): void;
/** Function to call when item is removed */
onRemove?(id: UniqueIdentifier): void;
/** Function to set the wrapper ref */
wrapperRef?(node: HTMLLIElement): void;
}
type SortableTreeItemProps, E extends HTMLElement> = TreeItemProps & {
id: UniqueIdentifier;
/** The component to use for rendering the tree item */
TreeItemComponent: TreeItemComponent;
/** Whether sorting should be disabled for this item */
shouldDisableSorting?: boolean;
/** Props for the sortable functionality */
sortableProps?: Omit;
/** Whether to keep the ghost item in place while dragging */
keepGhostInPlace?: boolean;
/** A list of trails to render before the item */
trails: ('none' | 'straight' | 'straight-curved' | 'curved')[];
/** Function to call when the item has changed */
onItemsChanged: (newItems: FlattenedTreeItem[], itemChangedReason: ItemChangedReason) => void;
/** All items in the tree */
items: FlattenedTreeItem[];
ariaLevel?: number;
ariaPosInSet?: number;
ariaSetSize?: number;
tabIndex?: number;
/** Function to call when the item receives focus */
onFocus?: () => void;
};
declare const SortableTreeViewItemNotMemoized: , E extends HTMLElement>({ id, depth, isLast, TreeItemComponent, parent, shouldDisableSorting, sortableProps, keepGhostInPlace, item, onCollapse, trails, onItemsChanged, items, ariaLevel, ariaPosInSet, ariaSetSize, tabIndex, onFocus, ...restProps }: SortableTreeItemProps) => import("react/jsx-runtime").JSX.Element;
export declare const SortableTreeViewItem: typeof SortableTreeViewItemNotMemoized;
export {};
//# sourceMappingURL=TreeViewItem.d.ts.map