import { OnDestroy, OnInit, Type } from '@angular/core'; import { Subject, Subscription } from 'rxjs'; import { Category } from '../models/category/category'; import { SearchAutocompleteOption } from '../models/category/search-autocomplete-option'; import { ElementaryPredicate } from '../models/predicate/elementary-predicate'; import { LoggerService } from '../../logger/services/logger.service'; import { MatSelect } from '@angular/material/select'; import { EditableElementaryPredicate } from '../models/predicate/editable-elementary-predicate'; import { AdvancedSearchComponentInitializationService } from '../advanced-search-component-initialization-service/advanced-search-component-initialization.service'; import { CategoryFactory } from '../category-factory/category-factory'; import * as i0 from "@angular/core"; /** * Is responsible for the interactive creation of a single {@link ElementaryPredicate} object instance. */ export declare abstract class AbstractSearchPredicateComponent implements OnInit, OnDestroy { private _naeSearchCategories; protected _logger: LoggerService; protected _initializationService: AdvancedSearchComponentInitializationService; protected _categoryFactory: CategoryFactory; /** * Whether the contents displayed in this component can be edited by the user or not. * * Defaults to `true` */ editable: boolean; predicate: EditableElementaryPredicate; predicateId: number; remove$: Subject; /** * Optional generator with prefilled values. Can be used to add prefilled predicate components to the search GUI. */ generator: Category | undefined; protected _selectedCategory: Category; protected _predicateChange: Subscription; protected _searchCategories: Array>; protected constructor(_naeSearchCategories: Array>>, _logger: LoggerService, _initializationService: AdvancedSearchComponentInitializationService, _categoryFactory: CategoryFactory); ngOnInit(): void; ngOnDestroy(): void; get searchCategories(): Array>; set categoryInput(input: MatSelect); get selectedCategory(): Category; set selectedCategory(newCategory: Category); /** * Lambda that is used to preserve `this` reference in HTML binding. * * See [_renderSelection()]{@link AbstractSearchPredicateComponent#_renderSelection} for information about the transform function. * @param option the {@link SearchAutocompleteOption} object that was selected in the autocomplete list. */ renderSelection: (option: SearchAutocompleteOption) => string; remove(): void; categoryChanged(newCategory: Category): void; clearCategorySelection(): void; /** * Transforms a {@link SearchAutocompleteOption} object into it's name. * Used for displaying user selection in the input field, when an autocomplete option is selected. * @param option the object we want to transform. It might not exist if user input doesn't match any autocomplete option * @returns option name if it exists, empty string otherwise */ protected _renderSelection(option: SearchAutocompleteOption): string; /** * Notifies the `EditableElementaryPredicate` about changes to the predicate generated by the selected `Category`. * @param newPredicate predicate generated by the selected `Category` */ protected processPredicateChange(newPredicate: ElementaryPredicate | undefined): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }