/// <reference types="googlemaps" />
import { OnInit, ElementRef } from '@angular/core';
import { Observable } from 'rxjs';
import { JSON as HestiaJson, SchemaType, NodeType, Bibliography, Source } from '@hestia-earth/schema';
import { IErrorProperty, INodeProperty, suggestionType } from '../files-form.model';
import { HeUsersService } from '../../users/users.service';
import { HeSearchService } from '../../search/search.service';
import * as i0 from "@angular/core";
export declare class FilesFormComponent implements OnInit {
    ref: ElementRef;
    private searchService;
    private usersService;
    private schemas?;
    private errors;
    node?: HestiaJson<SchemaType>;
    nodeMap: {
        [type in NodeType]?: string[];
    };
    /**
     * Allow editing nodes (`false` for readonly).
     */
    editable: boolean;
    errorMode: boolean;
    deepEditable: boolean;
    /**
     * Can edit errors.
     */
    errorsEditable: boolean;
    /**
     * When selecting terms, will show default properties or not.
     * Should be `false` when using schema validation, as only the `name` would be added.
     */
    showSuggestedDefaultProperties: boolean;
    private nodeChange;
    private nodeErorrResolved;
    private nodeErrorAdded;
    NodeType: typeof NodeType;
    SchemaType: typeof SchemaType;
    isOpen: boolean;
    mapVisible: boolean;
    pluralize: any;
    formatPropertyError: (errors: any, property: INodeProperty) => string;
    mapDrawingProperty?: INodeProperty;
    bibliographiesSearchProperty?: INodeProperty;
    nodeProperty?: INodeProperty;
    properties: INodeProperty[];
    formatter: (value: any) => any;
    suggestNewProperty: (fullKey: string) => (text$: Observable<string>) => Observable<{
        name: string;
        prop: any;
    }[]>;
    private suggestExistingNode;
    private suggestNode;
    private suggester;
    propertySuggest: (fullKey: string, suggestType: suggestionType) => (text$: Observable<string>) => Observable<any[]>;
    constructor(ref: ElementRef, searchService: HeSearchService, usersService: HeUsersService);
    ngOnInit(): void;
    trackByIndex(index: number, _value: any): number;
    trackByProperty(_index: number, { id, fullKey }: INodeProperty): string;
    hasAddons(property: INodeProperty): string | number | boolean;
    isRequired({ value, isRequired }: INodeProperty): boolean;
    private get suggestTermFields();
    enableAddError(property: INodeProperty): boolean;
    addError(property: INodeProperty, { message, level }: IErrorProperty): void;
    editError(property: INodeProperty): void;
    resolveError(property: INodeProperty): void;
    typeaheadFocus(e: Event): void;
    addPropertyEnabled(property: INodeProperty): boolean;
    private newProperties;
    private replacePropertyData;
    suggestionSelected({ '@id': _id, name, type, id, ...data }: {
        [x: string]: any;
        "@id": any;
        name: any;
        type: any;
        id: any;
    }, property: INodeProperty): void;
    addArrayGroup(array: INodeProperty): void;
    duplicateArrayGroup(array: INodeProperty, property: INodeProperty): void;
    removeArrayGroup(array: INodeProperty, { key }: INodeProperty): void;
    private moveArrayGroupToPosition;
    moveArrayGroupUp(array: INodeProperty, { key }: INodeProperty): void;
    moveArrayGroupDown(array: INodeProperty, { key }: INodeProperty): void;
    propertyChanged(value: any, property: INodeProperty): void;
    private addDefaultProperty;
    addMissingProperty(property: INodeProperty): void;
    addProperty(property: INodeProperty): void;
    private updatePropertyCoordinates;
    get showMap(): boolean;
    mapDrawingModes({ key }: INodeProperty): google.maps.drawing.OverlayType[];
    onMapDrawingClosed(newValue: any): void | void[];
    bibliographiesSearchKey({ key, schemaType }: INodeProperty): string;
    private updateBibliography;
    private updateSource;
    get bibliographiesSearchSources(): boolean;
    onBibliographiesSearchClosed(value?: Partial<Source> | Partial<Bibliography>): void;
    setUserActorId(property: INodeProperty): Promise<void>;
    calculateCycleDurationEnabled(property: INodeProperty): boolean;
    calculateCycleDuration(property: INodeProperty): void;
    calculateCycleStartDateEnabled(property: INodeProperty): boolean;
    calculateCycleStartDate(property: INodeProperty): void;
    unitConverterEnabled(property: INodeProperty): boolean;
    openUnitConverter(popover: any, property: INodeProperty): any;
    onSelectRecommendation(array: INodeProperty, id: string): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<FilesFormComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FilesFormComponent, "he-files-form", never, { "schemas": "schemas"; "errors": "errors"; "node": "node"; "nodeMap": "nodeMap"; "editable": "editable"; "errorMode": "errorMode"; "deepEditable": "deepEditable"; "errorsEditable": "errorsEditable"; "showSuggestedDefaultProperties": "showSuggestedDefaultProperties"; }, { "nodeChange": "nodeChange"; "nodeErorrResolved": "nodeErorrResolved"; "nodeErrorAdded": "nodeErrorAdded"; }, never, ["*"]>;
}
