import { OnInit, OnChanges, SimpleChanges, ElementRef, EventEmitter } from '@angular/core'; import { FormGroup, FormControl } from '@angular/forms'; import { SelectOption } from '../../dynamic-select/dynamic-select-field.component'; import * as i0 from "@angular/core"; export interface WorkspaceSelectorConfig { key?: string; label?: string; placeholder?: string; disabled?: boolean; searchable?: boolean; /** If true, close the panel when an option is selected. */ closeOnSelect?: boolean; /** Provide a default selected value if the control has no value yet. */ selectedValue?: any; /** Optional callback invoked whenever the selection changes. */ onChange?: (value: any) => void; /** Enable server-side search mode; component will emit search instead of local filtering. */ serverSearch?: boolean; /** * When true, triggers an initial search emit on panel open (serverSearch mode only). * Defaults to false so opening the dropdown does NOT call the API. */ initialFetchOnOpen?: boolean; /** Indicates more results are available for infinite scroll. */ hasMore?: boolean; /** Optional loading flag controlled by consumer to show loading state. */ isLoading?: boolean; /** Optional callback for server-side search when query changes. */ onSearch?: (query: string) => void; /** Optional callback when more data is requested (infinite scroll). */ onLoadMore?: (query?: string) => void; /** Optional regex pattern or function to highlight parts of option text. */ highlightPattern?: RegExp | string | ((text: string) => string); options: SelectOption[]; valueBy?: string; /** Item size for virtual scroll (default: 48) */ itemSize?: number; /** Viewport height for virtual scroll in pixels (default: 300) */ viewportHeight?: number; } export declare class WorkspaceSelectorComponent implements OnInit, OnChanges { form?: FormGroup; config: WorkspaceSelectorConfig; /** Direct value binding - selected workspace object. Use this instead of form control. */ value?: any; /** Emits the selected workspace object when selection changes */ valueChange: EventEmitter; selectionChange: EventEmitter<{ key: string; value: any; option?: SelectOption; }>; selectClick: EventEmitter; /** Emits when user types in search box (useful for server search) */ searchChange: EventEmitter<{ key: string; query: string; }>; /** Emits when the component requests more data for the current query */ loadMore: EventEmitter<{ key: string; query: string; }>; hostEl?: ElementRef; dropdownPanel?: ElementRef; viewport?: any; internalForm: FormGroup; internalControl: FormControl; searchText: string; isOpen: boolean; loadingMore: boolean; private lastOptionsLength; private hasScrolledSinceOpen; private panelScrollEl?; private onPanelScroll; constructor(); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; private syncValueFromInput; get currentForm(): FormGroup; get controlKey(): string; get currentControl(): FormControl; /** Get current value - from form control if form provided, otherwise from direct value binding */ get currentValue(): any; /** Set current value - to form control if form provided, otherwise update direct value */ set currentValue(val: any); get isDisabled(): boolean; get displayPlaceholder(): string | undefined; get displayValue(): string; get itemSize(): number; get viewportHeight(): number; get displayedOptions(): SelectOption[]; private toBoolean; getOptionValue(opt: SelectOption | null | undefined): any; getOptionLabel(opt: SelectOption): string; private syncDisabledState; private syncControlValueForMultipleMode; private applySelectedValueIfNeeded; private hasExistingValue; isOptionSelected(opt: SelectOption): boolean; filteredOptions(): SelectOption[]; private getSelectedIds; onOptionClick(opt: SelectOption): void; onSelectionChange(newValue?: any, selectedOption?: SelectOption): void; onSearchInput(value: string): void; toggleDropdown(): void; openDropdown(): void; closeDropdown(): void; private setupScrollListener; onScrolledIndexChange(index: number): void; trackByOption: (index: number, opt: SelectOption | null | undefined) => any; highlightText(text: string): string; private escapeHtml; get hasHighlighting(): boolean; handleDocumentClick(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }