import { default as CxButton } from '../../../../../atoms/src/components/button/button.ts';
import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
import { default as CxLineClamp } from '../../../../../atoms/src/components/line-clamp/line-clamp.ts';
import { default as CxSpace } from '../../../../../atoms/src/components/space/space.ts';
import { default as CxTreeItem } from '../../../../../atoms/src/components/tree-item/tree-item.ts';
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
import { MediaType } from '../../../../../types/src/asset-link-format';
import { Folder, FolderSelectApi, GetFolderResponse } from '../../../../../types/src/folder-select';
import { CSSResultGroup, TemplateResult } from 'lit';

export default class CxFolderSelectTreeItem extends CortexElement {
    private readonly localize;
    static readonly styles: CSSResultGroup;
    static readonly dependencies: {
        'cx-button': typeof CxButton;
        'cx-icon': typeof CxIcon;
        'cx-line-clamp': typeof CxLineClamp;
        'cx-space': typeof CxSpace;
        'cx-tree-item': typeof CxTreeItem;
    };
    role: string;
    /**
     * cx-tree's syncCheckboxes/syncAncestors machinery walks `parentElement`
     * and treats anything with `role="treeitem"` as a CxTreeItem. We expose
     * this wrapper as a treeitem (for ARIA + selection plumbing) but it
     * isn't a real CxTreeItem — it has no `getChildrenItems`. Telling
     * syncAncestors to skip past us prevents `treeItem.getChildrenItems is
     * not a function` and matches our per-folder selection model where
     * parent state isn't auto-synced from children.
     */
    disabledSyncCheckboxes: boolean;
    readonly treeItem: CxTreeItem;
    folderId: string;
    hasChildren: boolean;
    selectable: boolean;
    fullPath: string;
    docType: MediaType;
    name: string;
    representativeAssetId: string;
    selectedValue: string;
    /**
     * Selection mode propagated from cx-folder-select-tree.
     * When `'multiple'`, selection state is driven declaratively from
     * `currentRootIDsSet` / `removedIDs` via `syncBoxes()` (file-on-demand pattern),
     * so it survives data reloads (search filters) and parents can show
     * indeterminate from selected descendants without those descendants
     * being loaded yet. When `'single'`, the legacy `selectedValue === folderId`
     * binding on the inner cx-tree-item is used.
     */
    selection: 'multiple' | 'single';
    /**
     * Set of selected root IDs encoded as `${path}-${id}`. The set is owned by
     * cx-folder-select-tree and passed in; tree-items only read from it.
     */
    currentRootIDsSet: Set<string>;
    /**
     * IDs (`${path}-${id}`) explicitly unchecked while their ancestor was
     * selected. Used to render `indeterminate` on a selected ancestor.
     */
    removedIDs: string[];
    token: string;
    bearerToken: string;
    baseUrl: string;
    searchTerm: string;
    api?: FolderSelectApi;
    excludeVirtualFolders: boolean;
    url: string;
    /** Overrides the default `folder` icon name when set. */
    icon: string;
    data: Folder[] | null;
    hasMore: boolean;
    loading: boolean;
    /**
     * This is used to render the cx-tree-item inside the cx-folder-item without the shadow root so that the cx-tree can query select the cx-tree-item inside
     */
    createRenderRoot(): this;
    fetchFolders({ folderId, start, }: {
        folderId: string;
        start?: number;
    }): Promise<GetFolderResponse>;
    loadMore(event: MouseEvent): Promise<void>;
    private handleLazyLoad;
    /**
     * Recompute this tree-item's selected/indeterminate state from the
     * top-level selection set, purely declaratively. This lets us:
     * - Persist selection across data reloads (e.g. when the user types a
     *   search term, items get re-rendered but their state is recomputed
     *   from the same set).
     * - Show a parent as indeterminate when a descendant 3-4 levels deep
     *   is selected, even if the descendant isn't loaded yet — we only
     *   need its path prefix to match.
     *
     * Mirrors `cx-folder-item.syncBoxes` from packages/organisms/file-on-demand.
     */
    syncBoxes(): Promise<void>;
    render(): TemplateResult;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-folder-select-tree-item': CxFolderSelectTreeItem;
    }
}
