import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { DataService, FacetWithValueListFragment, GetFacetDetailDocument, LanguageCode, ModalService, NotificationService, Permission, TypedBaseDetailComponent } from '@vendure/admin-ui/core'; import { BehaviorSubject } from 'rxjs'; import * as i0 from "@angular/core"; export declare const FACET_DETAIL_QUERY: import("apollo-angular").TypedDocumentNode; type ValueItem = FacetWithValueListFragment['valueList']['items'][number] | { id: string; name: string; code: string; }; export declare class FacetDetailComponent extends TypedBaseDetailComponent implements OnInit, OnDestroy { private changeDetector; protected dataService: DataService; private formBuilder; private notificationService; private modalService; readonly customFields: import("@vendure/admin-ui/core").CustomFieldConfig[]; readonly customValueFields: import("@vendure/admin-ui/core").CustomFieldConfig[]; detailForm: FormGroup<{ facet: FormGroup<{ code: FormControl; name: FormControl; visible: FormControl; customFields: FormGroup<{ [x: string]: FormControl<{} | null>; }>; }>; values: FormGroup<{ [key: string]: FormGroup<{ id: FormControl; name: FormControl; code: FormControl; customFields: FormGroup; }>; }>; }>; currentPage: number; itemsPerPage: number; totalItems: number; filterControl: FormControl; values$: BehaviorSubject; readonly updatePermission: Permission[]; constructor(changeDetector: ChangeDetectorRef, dataService: DataService, formBuilder: FormBuilder, notificationService: NotificationService, modalService: ModalService); ngOnInit(): void; ngOnDestroy(): void; updateCode(currentCode: string, nameValue: string): void; updateValueCode(currentCode: string, nameValue: string, valueId: string): void; customValueFieldIsSet(index: number, name: string): boolean; addFacetValue(): void; create(): void; save(): void; deleteFacetValue(facetValueId: string): void; private showModalAndDelete; protected setCurrentPage(newPage: number): void; protected setItemsPerPage(itemsPerPage: number): void; private fetchFacetValues; /** * Sets the values of the form on changes to the facet or current language. */ protected setFormValues(facet: FacetWithValueListFragment, languageCode: LanguageCode): void; private setFacetValueFormValues; /** * Given a facet and the value of the detailForm, this method creates an updated copy of the facet which * can then be persisted to the API. */ private getUpdatedFacet; /** * Given an array of facet values and the values from the detailForm, this method creates a new array * which can be persisted to the API via an updateFacetValues mutation. */ private getUpdatedFacetValues; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};