import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, Injector, NgZone, OnDestroy, OnInit } from '@angular/core';
import { OFormToolbarComponent } from './toolbar/o-form-toolbar.component';
import { FormGroup } from '@angular/forms';
import { ActivatedRoute, ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlSegment } from '@angular/router';
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
import { IComponent } from '../../interfaces/component.interface';
import { IFormDataComponentHash } from '../../interfaces/form-data-component-hash.interface';
import { IFormDataComponent } from '../../interfaces/form-data-component.interface';
import { IFormDataTypeComponent } from '../../interfaces/form-data-type-component.interface';
import { ServiceResponse } from '../../interfaces/service-response.interface';
import { OFormLayoutManagerBase } from '../../layouts/form-layout/o-form-layout-manager-base.class';
import { DialogService } from '../../services/dialog.service';
import { NavigationService } from '../../services/navigation.service';
import { PermissionsService } from '../../services/permissions/permissions.service';
import { SnackBarService } from '../../services/snackbar.service';
import { OConfigureServiceArgs } from '../../types/configure-service-args.type';
import { OFormValidation } from '../../types/error-form-validation.type';
import { FormValueOptions } from '../../types/form-value-options.type';
import { OFormInitializationOptions } from '../../types/o-form-initialization-options.type';
import { OFormPermissions } from '../../types/o-form-permissions.type';
import { OPermissions } from '../../types/o-permissions.type';
import { OQueryParams } from '../../types/query-params.type';
import { OFormContainerComponent } from '../form-container/o-form-container.component';
import { OFormCacheClass } from './cache/o-form.cache.class';
import { CanComponentDeactivate, CanDeactivateFormGuard } from './guards/o-form-can-deactivate.guard';
import { OFormNavigationClass } from './navigation/o-form.navigation.class';
import { IOFormParent } from '../../interfaces/o-form-parent.interface';
import { OFormMessageService } from './services/o-form-message.service';
import { OFormToolbarBase } from './toolbar/o-form-toolbar-base.class';
import { BaseService } from '../../services/base-service.class';
import * as i0 from "@angular/core";
export declare const DEFAULT_INPUTS_O_FORM: string[];
export declare const DEFAULT_OUTPUTS_O_FORM: string[];
export declare class OFormComponent implements OnInit, OnDestroy, CanComponentDeactivate, AfterViewInit, IOFormParent {
    protected router: Router;
    protected actRoute: ActivatedRoute;
    protected zone: NgZone;
    protected cd: ChangeDetectorRef;
    protected injector: Injector;
    protected elRef: ElementRef;
    static DEFAULT_LAYOUT_DIRECTION: string;
    static guardClassName: string;
    get showHeader(): boolean;
    set showHeader(val: boolean | string);
    protected _showHeader: boolean;
    headerMode: string;
    headerPosition: 'top' | 'bottom';
    labelheader: string;
    labelHeaderAlign: string;
    headeractions: string;
    showHeaderActionsText: string;
    showBackButton: string;
    entity: string;
    keys: string;
    columns: string;
    setValueOrder: string;
    service: string;
    stayInRecordAfterEdit: boolean;
    afterInsertMode: 'new' | 'detail' | 'close';
    serviceType: string;
    get queryOnInit(): boolean;
    set queryOnInit(val: boolean | string);
    private _queryOnInit;
    protected parentKeys: string;
    protected getMethod: string;
    protected queryMethod: string;
    protected insertMethod: string;
    protected updateMethod: string;
    protected deleteMethod: string;
    protected _layoutDirection: string;
    protected _layoutAlign: string;
    protected editableDetail: boolean;
    protected keysSqlTypes: string;
    undoButton: boolean;
    get showHeaderNavigation(): boolean;
    set showHeaderNavigation(val: boolean | string);
    private _showHeaderNavigation;
    oattr: string;
    includeBreadcrumb: boolean;
    detectChangesOnBlur: boolean;
    get confirmExit(): boolean;
    set confirmExit(val: boolean | string);
    private _confirmExit;
    setValueOrderArray: string[];
    set ignoreOnExit(val: string[]);
    get ignoreOnExit(): string[];
    protected _ignoreOnExit: string[];
    queryFallbackFunction: (error: any) => void;
    ignoreDefaultNavigation: boolean;
    messageServiceType: string;
    formDataValidationFunction: (data: any) => OFormValidation;
    insertFunction?: (values: object, entity: string, sqlTypes?: object) => Observable<ServiceResponse>;
    updateFunction?: (filter: object, values: object, entity: string, sqlTypes?: object) => Observable<ServiceResponse>;
    deleteFunction?: (filter: object, entity: string, sqlTypes?: object) => Observable<ServiceResponse>;
    queryFunction?: (queryParams: OQueryParams) => Observable<ServiceResponse>;
    isDetailForm: boolean;
    keysArray: string[];
    colsArray: string[];
    dataService: BaseService<ServiceResponse>;
    _pKeysEquiv: {};
    keysSqlTypesArray: Array<string>;
    protected _messageService: OFormMessageService;
    formGroup: FormGroup;
    onDataLoaded: EventEmitter<object>;
    beforeCloseDetail: EventEmitter<any>;
    beforeGoEditMode: EventEmitter<any>;
    beforeInsertMode: EventEmitter<null>;
    beforeUpdateMode: EventEmitter<null>;
    beforeInitialMode: EventEmitter<null>;
    onInsertMode: EventEmitter<null>;
    onUpdateMode: EventEmitter<null>;
    onInitialMode: EventEmitter<null>;
    onFormModeChange: EventEmitter<number>;
    onBeforeInsert: EventEmitter<any>;
    onBeforeUpdate: EventEmitter<any>;
    onBeforeDelete: EventEmitter<any>;
    onInsert: EventEmitter<any>;
    onUpdate: EventEmitter<any>;
    onDelete: EventEmitter<any>;
    onInsertError: EventEmitter<any>;
    onUpdateError: EventEmitter<any>;
    onDeleteError: EventEmitter<any>;
    onCancel: EventEmitter<null>;
    protected loadingSubject: BehaviorSubject<boolean>;
    loading: Observable<boolean>;
    formData: object;
    navigationData: Array<any>;
    currentIndex: number;
    mode: number;
    protected dialogService: DialogService;
    protected navigationService: NavigationService;
    protected snackBarService: SnackBarService;
    protected _formToolbar: OFormToolbarBase;
    protected _components: IFormDataComponentHash;
    protected _compSQLTypes: object;
    formParentKeysValues: object;
    onFormInitStream: EventEmitter<boolean>;
    protected reloadStream: Observable<any>;
    protected reloadStreamSubscription: Subscription;
    protected querySubscription: Subscription;
    protected loaderSubscription: Subscription;
    protected dynamicFormSubscription: Subscription;
    protected deactivateGuard: CanDeactivateFormGuard;
    protected _canDeactivateFn: (component: CanComponentDeactivate, curr: ActivatedRouteSnapshot, state: RouterStateSnapshot, future: RouterStateSnapshot) => any;
    deactivateGuardId: string;
    protected formCache: OFormCacheClass;
    protected formNavigation: OFormNavigationClass;
    formContainer: OFormContainerComponent;
    protected permissionsService: PermissionsService;
    protected permissions: OFormPermissions;
    innerFormEl: ElementRef;
    ignoreFormCacheKeys: Array<any>;
    canDiscardChanges: boolean;
    static Mode(): any;
    protected configureServiceArgs: OConfigureServiceArgs;
    constructor(router: Router, actRoute: ActivatedRoute, zone: NgZone, cd: ChangeDetectorRef, injector: Injector, elRef: ElementRef);
    private getGlobalConfig;
    registerFormComponent(comp: any): void;
    registerSQLTypeFormComponent(comp: IFormDataTypeComponent): void;
    registerFormControlComponent(comp: IFormDataComponent): void;
    unregisterFormComponent(comp: IComponent): void;
    getAttribute(): string;
    unregisterFormControlComponent(comp: IFormDataComponent): void;
    unregisterSQLTypeFormComponent(comp: IFormDataTypeComponent): void;
    registerToolbar(fToolbar: OFormToolbarComponent): void;
    getComponents(): IFormDataComponentHash;
    getComponentByAttr(attr: string): IFormDataComponent;
    load(): any;
    getDataValue(attr: string): any;
    getDataValues(): object;
    clearData(): void;
    canDeactivate(): Observable<boolean> | Promise<boolean> | boolean;
    showConfirmDiscardChanges(): Promise<boolean>;
    executeToolbarAction(action: string, options?: any): Observable<any>;
    ngOnInit(): void;
    addDeactivateGuard(): void;
    destroyDeactivateGuard(): void;
    hasDeactivateGuard(): boolean;
    initialize(): void;
    reinitialize(options: OFormInitializationOptions): void;
    configureService(): void;
    get messageService(): OFormMessageService;
    ngOnDestroy(): void;
    destroy(): void;
    ngAfterViewInit(): void;
    _setComponentsEditable(state: boolean): void;
    setFormMode(mode: number): void;
    setData(data: any): void;
    _setData(data: any): void;
    _emitData(data: any): void;
    _backAction(): void;
    back(options?: any): void;
    _closeDetailAction(options?: any): void;
    closeDetail(options?: any): void;
    _stayInRecordAfterInsert(insertedKeys: object): void;
    _reloadAction(useFilter?: boolean): void;
    reload(useFilter?: boolean): void;
    getQueryArguments(useFilter: boolean, filter?: any): OQueryParams;
    _goInsertMode(options?: any): void;
    goInsertMode(options?: any): void;
    _clearFormAfterInsert(): void;
    _clearAndCloseFormAfterInsert(): void;
    _insertAction(): void;
    insert(): void;
    validateBeforeAction(values: object): boolean;
    _goEditMode(): void;
    goEditMode(): void;
    _editAction(): void;
    update(): void;
    _deleteAction(): Observable<any>;
    delete(): Observable<any>;
    queryData(filter: any): void;
    getAttributesToQuery(): Array<any>;
    insertData(values: any, sqlTypes?: object): Observable<any>;
    getAttributesValuesToInsert(): object;
    getAttributesSQLTypes(): object;
    updateData(filter: any, values: any, sqlTypes?: object): Observable<any>;
    getAttributesValuesToUpdate(): object;
    deleteData(filter: any): Observable<any>;
    toJSONData(data: any): {};
    toFormValueData(data: any): object;
    getKeysValues(): any;
    isInQueryMode(): boolean;
    isInInsertMode(): boolean;
    isInUpdateMode(): boolean;
    isInInitialMode(): boolean;
    setQueryMode(): void;
    setInsertMode(): void;
    setUpdateMode(): void;
    setInitialMode(): void;
    registerDynamicFormComponent(dynamicForm: any): void;
    unregisterDynamicFormComponent(dynamicForm: any): void;
    getRequiredComponents(): object;
    get layoutDirection(): string;
    set layoutDirection(val: string);
    get layoutAlign(): string;
    set layoutAlign(val: string);
    get layoutClasses(): string[];
    get showFloatingToolbar(): boolean;
    get showNotFloatingToolbar(): boolean;
    isEditableDetail(): boolean;
    isInitialStateChanged(ignoreAttrs?: string[]): boolean;
    _undoLastChangeAction(): void;
    undo(): void;
    get isCacheStackEmpty(): boolean;
    undoKeyboardPressed(): void;
    getFormToolbar(): OFormToolbarBase;
    getFormManager(): OFormLayoutManagerBase;
    getFormNavigation(): OFormNavigationClass;
    getFormCache(): OFormCacheClass;
    getUrlParam(arg: string): any;
    getUrlParams(): object;
    setUrlParamsAndReload(val: object): void;
    getRegisteredFieldsValues(): {};
    getFieldValue(attr: string): any;
    getFieldValues(attrs: string[]): any;
    setFieldValue(attr: string, value: any, options?: FormValueOptions): void;
    setFieldValues(values: any, options?: FormValueOptions): void;
    clearFieldValue(attr: string, options?: FormValueOptions): void;
    clearFieldValues(attrs: string[], options?: FormValueOptions): void;
    getFieldReference(attr: string): IFormDataComponent;
    getFieldReferences(attrs: string[]): IFormDataComponentHash;
    getFormComponentPermissions(attr: string): OPermissions;
    getActionsPermissions(): OPermissions[];
    protected determinateFormMode(): void;
    protected determinateModeFromUrlSegment(segment: UrlSegment): void;
    protected _updateFormData(newFormData: object): void;
    private setDataInFormDataComponent;
    protected initializeFields(): void;
    protected clearComponentsOldValue(): void;
    protected postCorrectInsert(result: any): void;
    protected postIncorrectInsert(result: any): void;
    protected postIncorrectDelete(result: any): void;
    protected postIncorrectUpdate(result: any): void;
    protected postCorrectUpdate(result: any): void;
    protected postCorrectDelete(result: any): void;
    protected markFormLayoutManagerToUpdate(): void;
    protected objectToFormValueData(data?: object): object;
    protected getCurrentKeysValues(): object;
    protected refreshComponentsEditableState(): void;
    protected isInsertModePath(path: string): boolean;
    protected isUpdateModePath(path: string): boolean;
    private showError;
    static ɵfac: i0.ɵɵFactoryDeclaration<OFormComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<OFormComponent, "o-form", never, { "showHeader": { "alias": "show-header"; "required": false; }; "headerMode": { "alias": "header-mode"; "required": false; }; "headerPosition": { "alias": "header-position"; "required": false; }; "labelheader": { "alias": "label-header"; "required": false; }; "labelHeaderAlign": { "alias": "label-header-align"; "required": false; }; "headeractions": { "alias": "header-actions"; "required": false; }; "showHeaderActionsText": { "alias": "show-header-actions-text"; "required": false; }; "entity": { "alias": "entity"; "required": false; }; "keys": { "alias": "keys"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "service": { "alias": "service"; "required": false; }; "stayInRecordAfterEdit": { "alias": "stay-in-record-after-edit"; "required": false; }; "afterInsertMode": { "alias": "after-insert-mode"; "required": false; }; "serviceType": { "alias": "service-type"; "required": false; }; "queryOnInit": { "alias": "query-on-init"; "required": false; }; "parentKeys": { "alias": "parent-keys"; "required": false; }; "queryMethod": { "alias": "query-method"; "required": false; }; "insertMethod": { "alias": "insert-method"; "required": false; }; "updateMethod": { "alias": "update-method"; "required": false; }; "deleteMethod": { "alias": "delete-method"; "required": false; }; "layoutDirection": { "alias": "layout-direction"; "required": false; }; "layoutAlign": { "alias": "layout-align"; "required": false; }; "editableDetail": { "alias": "editable-detail"; "required": false; }; "keysSqlTypes": { "alias": "keys-sql-types"; "required": false; }; "undoButton": { "alias": "undo-button"; "required": false; }; "showHeaderNavigation": { "alias": "show-header-navigation"; "required": false; }; "oattr": { "alias": "attr"; "required": false; }; "includeBreadcrumb": { "alias": "include-breadcrumb"; "required": false; }; "detectChangesOnBlur": { "alias": "detect-changes-on-blur"; "required": false; }; "confirmExit": { "alias": "confirm-exit"; "required": false; }; "ignoreOnExit": { "alias": "ignore-on-exit"; "required": false; }; "queryFallbackFunction": { "alias": "query-fallback-function"; "required": false; }; "ignoreDefaultNavigation": { "alias": "ignore-default-navigation"; "required": false; }; "messageServiceType": { "alias": "message-service-type"; "required": false; }; "configureServiceArgs": { "alias": "configure-service-args"; "required": false; }; "setValueOrder": { "alias": "set-value-order"; "required": false; }; "formDataValidationFunction": { "alias": "form-data-validation-function"; "required": false; }; "insertFunction": { "alias": "insert-function"; "required": false; }; "updateFunction": { "alias": "update-function"; "required": false; }; "deleteFunction": { "alias": "delete-function"; "required": false; }; "queryFunction": { "alias": "query-function"; "required": false; }; "showBackButton": { "alias": "show-back-button"; "required": false; }; }, { "onDataLoaded": "onDataLoaded"; "beforeCloseDetail": "beforeCloseDetail"; "beforeGoEditMode": "beforeGoEditMode"; "onFormModeChange": "onFormModeChange"; "onBeforeInsert": "onBeforeInsert"; "onBeforeUpdate": "onBeforeUpdate"; "onBeforeDelete": "onBeforeDelete"; "onInsert": "onInsert"; "onUpdate": "onUpdate"; "onDelete": "onDelete"; "onInsertError": "onInsertError"; "onUpdateError": "onUpdateError"; "onDeleteError": "onDeleteError"; "beforeInsertMode": "beforeInsertMode"; "beforeUpdateMode": "beforeUpdateMode"; "beforeInitialMode": "beforeInitialMode"; "onInsertMode": "onInsertMode"; "onUpdateMode": "onUpdateMode"; "onInitialMode": "onInitialMode"; "onCancel": "onCancel"; }, never, ["[o-form-toolbar-buttons]", "*"], true, never>;
}
