/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
import { CdkDrag, CdkDragDrop, CdkDragMove, CdkDragRelease, CdkDropList } from '@angular/cdk/drag-drop';
import { AfterViewInit, EventEmitter, OnChanges, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { NotificationService } from '@asoftwareworld/form-builder-pro/common';
import { AswTranslateService } from '@asoftwareworld/form-builder-pro/core';
import { ControlOption, CSSFrameworkEnum } from '@asoftwareworld/form-builder-pro/api';
import { DragDropService } from './drag-drop.service';
import * as i0 from "@angular/core";
export declare class AswFormBuilder implements OnInit, AfterViewInit, OnChanges {
    translate: AswTranslateService;
    dialog: MatDialog;
    private notificationService;
    dragDropService: DragDropService;
    step: number;
    constants: any;
    simpleControls: any[];
    choiceControls: any[];
    advancedControls: any[];
    digitalControls: any[];
    layoutControls: any[];
    controls: any[];
    formContainer: any[];
    icons: any;
    currentLanguage: string;
    uploadData: any[];
    isShowPreviewButton: boolean;
    isShowJsonDataButton: boolean;
    isShowPublishButton: boolean;
    cssFramework: CSSFrameworkEnum;
    controlPersonalization: string[];
    propertyPersonalization: string[];
    controlCollectionName: string;
    patterns: ControlOption[];
    previewClick: EventEmitter<any[]>;
    publishClick: EventEmitter<any[]>;
    buttonClick: EventEmitter<any[]>;
    aswModelChange: EventEmitter<any>;
    dropList?: CdkDropList;
    allowDropPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean;
    constructor(translate: AswTranslateService, dialog: MatDialog, notificationService: NotificationService, dragDropService: DragDropService);
    ngOnInit(): void;
    private getControlConfig;
    private setSingleControlCollection;
    isNullOrEmptyOrWhitespace(str: string): boolean;
    private excludeControl;
    ngAfterViewInit(): void;
    setStep(index: number): void;
    changeLanguage(): void;
    ngOnChanges(): void;
    /**
     * Drops a draggable item inside a drop container.
     */
    dropped(event: CdkDragDrop<any[]>): void;
    /**
     * Set id and guid for newly dropped control.
     * @param previousContainer list of control
     * @param index control index
     */
    private setGuidId;
    private addRemoveControlFromContainer;
    private removedChildControl;
    /**
     * Reset the id, guid, and value of the duplicated control.
     * @param duplicateControl duplicated control
     * @returns Refreshed control
     */
    private resetDuplicateControl;
    /**
     * Cdk material is not able to determine the correct drop list. If there is a wrong drop list selected by cdk,
     * we just disallow the drop by returning false. In that case, cdk automatically selects the next possible
     * cdkDropList which is the correct.
     */
    isDropAllowed(drag: CdkDrag, drop: CdkDropList): boolean;
    /**
     * Whenever a cdkDrag is moved, dragMoved determines the correct cdkDropList.
     */
    dragMoved(event: CdkDragMove<any>): void;
    /**
     * Whenever a cdkDrag is released, reset the determined cdkDropList
     */
    dragReleased(event: CdkDragRelease): void;
    /**
     * Update control from the container
     * @param control data need to be update
     */
    updatedControl(control: any): void;
    /**
     * Delete control from the container
     * @param control data need to be delete
     */
    deleteControl(control: any): void;
    /**
     * Duplicate control from the container
     * @param control data need to be duplicate
     */
    duplicateControl(control: any): void;
    previewTemplate(): void;
    previewJsonData(): void;
    publishTemplate(): void;
    /**
     * Validate each control based on type and IsRequired.
     * @param type Submit | Reset
     */
    buttonClicked(type: string): void;
    onSelectionChange(control: any): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AswFormBuilder, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AswFormBuilder, "asw-form-builder", never, { "currentLanguage": { "alias": "currentLanguage"; "required": false; }; "uploadData": { "alias": "uploadData"; "required": false; }; "isShowPreviewButton": { "alias": "isShowPreviewButton"; "required": false; }; "isShowJsonDataButton": { "alias": "isShowJsonDataButton"; "required": false; }; "isShowPublishButton": { "alias": "isShowPublishButton"; "required": false; }; "cssFramework": { "alias": "cssFramework"; "required": false; }; "controlPersonalization": { "alias": "controlPersonalization"; "required": false; }; "propertyPersonalization": { "alias": "propertyPersonalization"; "required": false; }; "controlCollectionName": { "alias": "controlCollectionName"; "required": false; }; "patterns": { "alias": "patterns"; "required": false; }; }, { "previewClick": "previewClick"; "publishClick": "publishClick"; "buttonClick": "buttonClick"; "aswModelChange": "aswModelChange"; }, never, never, false, never>;
}
