import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
import { default as CxInput } from '../../../atoms/src/components/input/input.ts';
import { default as CxLineClamp } from '../../../atoms/src/components/line-clamp/line-clamp.ts';
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
import { default as CxTag } from '../../../atoms/src/components/tag/tag.ts';
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
import { Folder, FolderSelectApi, FolderSelectVariant } from '../../../types/src/folder-select';
import { CSSResultGroup, TemplateResult } from 'lit';
import { default as CxFolderSelectTree } from './components/folder-select-tree/folder-select-tree';

export default class CxFolderSelect extends CortexElement {
    #private;
    static readonly styles: CSSResultGroup;
    static readonly dependencies: {
        'cx-folder-select-tree': typeof CxFolderSelectTree;
        'cx-icon': typeof CxIcon;
        'cx-input': typeof CxInput;
        'cx-line-clamp': typeof CxLineClamp;
        'cx-select': typeof CxSelect;
        'cx-tag': typeof CxTag;
    };
    private readonly localize;
    selectEl?: CxSelect;
    minQueryLength: number;
    selection: 'multiple' | 'single';
    variant: FolderSelectVariant;
    value: string;
    name: string;
    selectedLabel: string;
    baseUrl: string;
    open: boolean;
    token: string;
    bearerToken: string;
    seeThru: boolean;
    api?: FolderSelectApi;
    required: boolean;
    form: string | HTMLElement | undefined;
    excludeVirtualFolders: boolean;
    extraFolderId: string;
    extraFolderTitle: string;
    extraFolderIcon: string;
    firstFetchCallback: ((data: Folder[]) => void) | null;
    searchTerm: string;
    constructor();
    updateWrappedApi(): void;
    handleSearchTermChange(): void;
    private handleSearchTermInputChange;
    private handleSearchTermSelectChange;
    private handleSelectClear;
    /**
     * cx-select's selectedOptions cache (which drives the tag UI in
     * `multiple` mode) is only recomputed during its own `selectionChanged`
     * flow — that flow doesn't run in our setup because we no-op
     * `selectSetOptionSelected` for multi-select (cx-tree owns selection).
     * After the tree's selection change propagates through `syncBoxes` and
     * lands on each tree-item's `.selected`, ask cx-select to re-read its
     * options so the rendered tag list matches.
     */
    private handleTreeSelectedChange;
    selectGetOptionValue(option: HTMLElement): string;
    selectGetOptionLabel(option: HTMLElement): string;
    selectGetOptionSelected(option: HTMLElement): boolean | undefined;
    selectFilterCallback(option: HTMLElement): boolean;
    /**
     * Custom tag renderer for cx-select multi mode. Identical visuals to the
     * default tag, but the X click goes through cx-tree's selection flow
     * (`option.selected = false` → `cx-selected-change` →
     * cx-folder-select-tree.handleSelectedChange) rather than
     * cx-select.toggleOptionSelection (which our `selectSetOptionSelected`
     * no-ops in multi mode, so the default X click would do nothing).
     */
    selectGetTag(option: HTMLElement): TemplateResult;
    selectSetOptionSelected(option: HTMLElement, selected: boolean): void;
    updateFunctionProps(): void;
    handleOpenChange(): void;
    handleVariantChange(): Promise<void>;
    handleValueChange(): void;
    render(): TemplateResult;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-folder-select': CxFolderSelect;
    }
}
