import { ChangeDetectorRef, EventEmitter } from '@angular/core'; import { FolderNode, ModularLabels } from '../modular-table-template.models'; import * as i0 from "@angular/core"; export declare const DEFAULT_FOLDER_COLOR = "#99999E"; export declare const FOLDER_NAME_MAX_LENGTH = 20; /** * Body of the "New Folder" dialog. * * Uses reusable library components (`cqa-custom-input` for the name field, * `cqa-move-to-folder-dialog` as an embedded tree picker for the parent folder) * so hosts can drop this dialog into their own modal shell without worrying * about styling drift. The tree picker handles arbitrarily deep nesting via * expand/collapse rather than a flat dropdown of "A › B › C ›…" paths. * * Two integration paths: * * 1. **From within this library** via `DialogService.open(...)`. The outer * `cqa-dialog` supplies title/description/Cancel/Create-folder buttons; the * Create button reads `name` + `parentId` via `getComponentInstance()`. * * 2. **Host-driven** — host renders `` inside its own * modal and listens to `(submitted)` / `(cancelled)` / `(nameChange)` / * `(parentIdChange)`. */ export declare class NewFolderDialogComponent { private cdr; private _folders; set folders(value: FolderNode[]); get folders(): FolderNode[]; private _labels; set labels(value: ModularLabels); get labels(): ModularLabels; name: string; /** Tracks whether the user has interacted with the name field, so we don't surface * the "required" error on first paint when the dialog opens with an empty name. */ private nameTouched; readonly maxNameLength = 20; parentId: number | null; color: string; readonly presetColors: string[]; readonly rainbowBorder: string; nameChange: EventEmitter; parentIdChange: EventEmitter; colorChange: EventEmitter; submitted: EventEmitter<{ name: string; parentId: number | null; color: string; }>; cancelled: EventEmitter; /** Labels passed to the embedded tree picker. Re-uses the move-dialog surface but * rewrites the root row's label so it reads "(no parent)" instead of "Unorganized" * for the create-folder context. */ parentPickerLabels: ModularLabels; constructor(cdr: ChangeDetectorRef); private buildParentPickerLabels; onNameChange(value: string): void; onParentPicked(id: number | null): void; isColor(c: string): boolean; get isCustomColor(): boolean; onColorChange(value: string): void; onColorInputEvent(event: Event): void; /** Errors surfaced under the name field. Only computed once the user has touched * the input so the dialog doesn't open with a "required" error already showing. */ get nameErrors(): string[]; /** Returns true when the current state is a valid submission (non-empty trimmed name * within the max length). Used by the host to gate the dialog's Create button. */ get isValid(): boolean; submit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }