import { ItemWithSubtree } from "../../types";
import type { ItemDescriptor } from "../pageModel";
import type { ItemTreeNodeData } from "../services/contentService";
/**
 * State of a per-item subitem-count stream. `loading` is the brief gap
 * before the first chunk arrives, an object carries the running count and
 * whether the backend stream has finished, and `error` indicates failure.
 */
export type SubitemCountState = "loading" | "error" | {
    count: number;
    complete: boolean;
};
export type SelectedTreeItemInput = Pick<ItemTreeNodeData, "id"> & Partial<Pick<ItemTreeNodeData, "displayName" | "icon" | "idPath" | "language" | "name" | "path" | "version">>;
export type ItemCollectionEditorProps = {
    /** Currently selected items with includeSubitems flag */
    items: ItemWithSubtree[];
    /** Selected nodes in the tree (for Add button) */
    selectedInTree: ItemTreeNodeData[];
    onSelectedInTreeChange: (items: ItemTreeNodeData[]) => void;
    /** Selected items in the right panel (for Remove button) */
    selectedFromList: ItemWithSubtree[];
    onSelectedFromListChange: (items: ItemWithSubtree[]) => void;
    /** Add selected tree items to the list */
    onAddToList: (items?: SelectedTreeItemInput[]) => void | Promise<void>;
    /** Remove selected list items */
    onRemoveFromList: () => void;
    /** Add a single item (from tree double-click or search) */
    onAddItem: (item: ItemTreeNodeData | (ItemDescriptor & {
        path?: string;
        idPath?: string;
        icon?: string;
    })) => void | Promise<void>;
    /** Remove item at index */
    onRemoveItem: (index: number) => void;
    /** Toggle includeSubitems at index */
    onToggleSubitems: (index: number) => void;
    /** Language for tree and item display */
    language: string;
    /** Root item IDs for the content tree */
    rootItemIds?: string[];
    /** Label for the selected items panel header */
    selectedItemsLabel?: string;
    /** Message when no items selected */
    emptyMessage?: string;
    emptyHint?: string;
    /** Height of the editor. Accepts a number (px) or any CSS length (e.g. "100%"). */
    height?: number | string;
    /**
     * Optional subitem counts keyed by item id. Value is "loading" before the
     * first chunk arrives, "error" on failure, or an object carrying the
     * latest count plus a `complete` flag that flips to true once the backend
     * stream finishes. Rendered next to the Subitems toggle when an item has
     * includeSubitems enabled.
     */
    subitemCounts?: Record<string, SubitemCountState>;
    /**
     * Tree expansion hint. Brace-wrapped, slash-separated GUID path(s). The
     * underlying ContentTree extracts every `{guid}` from the string and
     * expands those nodes, so multiple item paths can be concatenated to
     * expand to several items at once.
     */
    expandIdPath?: string;
    /** LocalStorage key for splitter position */
    localStorageKey?: string;
    /** Removes the outer frame while keeping internal panels and controls. */
    frameless?: boolean;
    /** Classes applied to the tree search wrapper. */
    treeSearchContainerClassName?: string;
};
export declare function ItemCollectionEditor({ items, selectedInTree, onSelectedInTreeChange, selectedFromList, onSelectedFromListChange, onAddToList, onRemoveFromList, onAddItem, onRemoveItem, onToggleSubitems, language, rootItemIds, selectedItemsLabel, emptyMessage, emptyHint, height, subitemCounts, expandIdPath, localStorageKey, frameless, treeSearchContainerClassName, }: ItemCollectionEditorProps): import("react").JSX.Element;
