import { DestroyRef, OnInit } from '@angular/core';
import { FormBuilder, FormControl, ValidatorFn } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog';
import { MatFormFieldAppearance } from '@angular/material/form-field';
import { NgmDSCoreService } from '@metad/ocap-angular/core';
import { CalculationProperty, CalculationType, DataSettings, EntityType, Syntax } from '@metad/ocap-core';
import { DialogRef } from '@angular/cdk/dialog';
import * as i0 from "@angular/core";
export interface CalculationEditorData {
    dataSettings: DataSettings;
    dsCoreService?: NgmDSCoreService;
    entityType: EntityType;
    syntax: Syntax;
    value: CalculationProperty;
}
export declare class NgmCalculationEditorComponent implements OnInit {
    #private;
    /**
    |--------------------------------------------------------------------------
    | Types
    |--------------------------------------------------------------------------
    */
    CALCULATION_TYPE: typeof CalculationType;
    SYNTAX: typeof Syntax;
    /**
    |--------------------------------------------------------------------------
    | Injectors
    |--------------------------------------------------------------------------
    */
    readonly destroyRef: DestroyRef;
    readonly fb: FormBuilder;
    dsCoreService?: NgmDSCoreService;
    /**
     * @deprecated use #dialogRef
     */
    readonly _dialogRef?: MatDialogRef<any, any>;
    /**
     * @deprecated use #data
     */
    readonly _data?: CalculationEditorData;
    get dialogRef(): MatDialogRef<any, any> | DialogRef<any, any>;
    get data(): any;
    /**
    |--------------------------------------------------------------------------
    | Inputs & Outputs
    |--------------------------------------------------------------------------
    */
    readonly appearance: import("@angular/core").InputSignal<MatFormFieldAppearance>;
    readonly dataSettings: import("@angular/core").InputSignal<DataSettings>;
    readonly value: import("@angular/core").InputSignal<CalculationProperty>;
    readonly apply: import("@angular/core").OutputEmitterRef<CalculationProperty>;
    readonly _dataSettings: import("@angular/core").WritableSignal<DataSettings>;
    readonly entityType: import("@angular/core").WritableSignal<EntityType>;
    readonly entitySyntax: import("@angular/core").Signal<Syntax>;
    readonly formGroup: import("@angular/forms").FormGroup<{
        __id__: FormControl<unknown>;
        calculationType: FormControl<CalculationType>;
        name: FormControl<string>;
        caption: FormControl<string>;
        formatting: import("@angular/forms").FormGroup<{
            unit: FormControl<any>;
            decimal: FormControl<any>;
        }>;
    }>;
    readonly key: FormControl<any>;
    readonly calculationType: FormControl<any>;
    readonly name: FormControl<any>;
    readonly caption: FormControl<any>;
    readonly unit: FormControl<any>;
    readonly calculation: FormControl<any>;
    readonly formula: FormControl<any>;
    /**
     * When in modification state, disable the selection of calculationType and the input of name
     */
    disableSelect: boolean;
    /**
    |--------------------------------------------------------------------------
    | Subscriptions (effects)
    |--------------------------------------------------------------------------
    */
    private entityTypeSub;
    constructor();
    ngOnInit(): void;
    initValue(value: CalculationProperty): void;
    onApply(): void;
    onCancel(): void;
    forbiddenNameValidator(): ValidatorFn;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgmCalculationEditorComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgmCalculationEditorComponent, "ngm-calculation-editor", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "dataSettings": { "alias": "dataSettings"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "apply": "apply"; }, never, never, true, never>;
}
