import { AfterContentInit, AfterViewInit, Injector, NgZone, OnDestroy, ViewContainerRef } from '@angular/core';
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
import { AbstractDialogService, App, DynamicComponentRefProvider } from '@wm/core';
import { PartialDirective, StylableComponent } from '@wm/components/base';
import { PrefabDirective } from '@wm/components/prefab';
import { ListComponent } from '@wm/components/data/list';
import * as i0 from "@angular/core";
export declare class FormComponent extends StylableComponent implements OnDestroy, AfterContentInit, AfterViewInit {
    private fb;
    private app;
    private dialogService;
    private dynamicComponentProvider;
    private ngZone;
    parentList: ListComponent;
    parentForm: FormComponent;
    parentPrefab: PrefabDirective;
    parentPartial: PartialDirective;
    onBeforeSubmitEvt: any;
    onSubmitEvt: any;
    onBeforeRenderEvt: any;
    binddataset: any;
    private bindformdata;
    static initializeProps: void;
    dynamicFormRef: ViewContainerRef;
    messageRef: any;
    componentRefs: any;
    autoupdate: any;
    formlayout: any;
    isDataSourceUpdated: boolean;
    captionAlignClass: string;
    validationtype: string;
    captionalign: string;
    captionposition: string;
    captionsize: any;
    collapsible: boolean;
    expanded: boolean;
    elScope: any;
    _widgetClass: string;
    captionwidth: string;
    _captionClass: string;
    ngform: FormGroup;
    formFields: any[];
    formfields: {};
    formWidgets: {};
    filterWidgets: {};
    buttonArray: any[];
    dataoutput: {};
    datasource: any;
    formdatasource: any;
    formdata: {};
    isSelected: any;
    prevDataValues: any;
    prevDataObject: any;
    prevformFields: any;
    statusMessage: {
        caption: string;
        type: string;
    };
    messagelayout: any;
    metadata: any;
    errormessage: any;
    onError: any;
    onSuccess: any;
    primaryKey: any[];
    postmessage: any;
    _liveTableParent: any;
    updateMode: any;
    name: any;
    clearData: Function;
    cancel: Function;
    delete: Function;
    save: Function;
    saveAndNew: Function;
    saveAndView: Function;
    setPrimaryKey: () => {};
    dialogId: string;
    enableemptyfilter: any;
    pagesize: any;
    result: any;
    pagination: any;
    clearFilter: Function;
    applyFilter: Function;
    filter: Function;
    filterOnDefault: Function;
    onMaxDefaultValueChange: Function;
    numberOfFields: number;
    private _debouncedUpdateFieldSource;
    private operationType;
    private _isLayoutDialog;
    private _dynamicContext;
    private _isGridLayoutPresent;
    private validationMessages;
    private formGroupName;
    private formArrayIndex;
    private bindingValue;
    private _formIsInList;
    private _triggeredByUser;
    private _debouncedSubmitForm;
    set isLayoutDialog(nv: any);
    get isLayoutDialog(): any;
    private _isUpdateMode;
    set isUpdateMode(nv: any);
    get isUpdateMode(): any;
    action: string;
    submit($event: any): void;
    onReset(): void;
    onKeydownHandler(event: KeyboardEvent): void;
    get parentFormArray(): FormArray;
    get isParentList(): any;
    constructor(inj: Injector, fb: FormBuilder, app: App, dialogService: AbstractDialogService, dynamicComponentProvider: DynamicComponentRefProvider, ngZone: NgZone, parentList: ListComponent, parentForm: FormComponent, parentPrefab: PrefabDirective, parentPartial: PartialDirective, onBeforeSubmitEvt: any, onSubmitEvt: any, onBeforeRenderEvt: any, binddataset: any, bindformdata: any, isLiveForm: any, isLiveFilter: any, role: any, key: any, name: any, explicitContext: any);
    ngAfterContentInit(): void;
    ngAfterViewInit(): void;
    findOperationType(): void;
    private addInnerNgFormToForm;
    private addEventsToContext;
    private setValidationOnInnerForms;
    /**
     * This method sets validation on formFields.
     * Applies to innerform and also sets innerform validation on parent form.
     * @param prefix contains the form name, which also includes its parents form name
     * @param {boolean} validateTouch
     */
    private setValidationOnFields;
    private prepareValidationObj;
    private setValidationMsgs;
    protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any): void;
    private updateFieldSource;
    highlightInvalidFields(): void;
    validateFieldsOnSubmit(): boolean;
    onPropertyChange(key: any, nv: any, ov?: any): void;
    onResultCb(data: any, status: any, event?: any): void;
    toggleMessage(show: boolean, msg?: string, type?: string, header?: string): void;
    checkAppServiceErrorMsg(type: any): any;
    clearMessage(): void;
    private setLayoutConfig;
    registerFormWidget(widget: any): void;
    registerFormFields(formField: any): void;
    registerActions(formAction: any): void;
    updateFormDataOutput(dataObject: any): void;
    constructDataObject(): {};
    updateDataOutput(): void;
    getFormFields(): any[];
    setFieldValue(field: any, data: any, innerFormdata?: any): void;
    setFormData(data: any, innerFormFields?: any, innerFormdata?: any): void;
    resetFormState(): void;
    reset(): void;
    savePrevformFields(): void;
    savePrevDataValues(): void;
    setReadonlyFields(): void;
    resetFileUploadWidget(field: any, skipValueSet?: any): void;
    emptyDataModel(): void;
    setDefaultValues(): void;
    setOperationType(mode: any): void;
    new(): void;
    edit(): void;
    private triggerWMEvent;
    submitForm($event: any): void;
    closeDialog(): void;
    showButtons(position: any): boolean;
    expandCollapsePanel(): void;
    onDataSourceUpdate(response: any, newForm: any, updateMode: any): void;
    /**
     * This method tranverses through the parent containing formdata and returns the parent formdata.
     * @param form, represents the current form instance
     * @returns {any}
     */
    getNearestParentFormData(form: any): any;
    setFormDataFromParentFormData(formdata: any): void;
    onDataSourceChange(): void;
    onFormDataSourceChange(): void;
    onFieldDefaultValueChange(field: any, nv: any): void;
    onFieldValueChange(): void;
    generateFormFields(): Promise<void>;
    get mode(): any;
    get dirty(): boolean;
    /**
     * This method sets the form state to pristine by internally calling angular markAsPristine method on the form
     * @param value, When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false
     * @returns {void}
     */
    markAsPristine(value?: boolean): void;
    /**
     * This method sets the form state to dirty by internally calling angular markAsDirty method on the form
     * @param value, When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false
     * @returns {void}
     */
    markAsDirty(value?: boolean): void;
    get invalid(): boolean;
    get touched(): boolean;
    get valid(): boolean;
    get pristine(): boolean;
    /**
     * This method sets the form state to touched by internally calling angular markAsTouched method on the form
     * @param value, When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false
     * @returns {void}
     */
    markAsTouched(value?: boolean): void;
    /**
     * This method sets the form state to untouched by internally calling angular markAsUntouched method on the form
     * @param value, When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false
     * @returns {void}
     */
    markAsUntouched(value?: boolean): void;
    invokeActionEvent($event: any, expression: string): void;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, [null, null, null, null, null, null, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { attribute: "beforesubmit.event"; }, { attribute: "submit.event"; }, { attribute: "beforerender.event"; }, { attribute: "dataset.bind"; }, { attribute: "formdata.bind"; }, { attribute: "wmLiveForm"; }, { attribute: "wmLiveFilter"; }, { attribute: "data-role"; }, { attribute: "key"; }, { attribute: "name"; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "form[wmForm]", never, {}, {}, ["componentRefs"], ["*"], false, never>;
}
