import { OnDestroy, RendererFactory2, EventEmitter } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';
import { UntypedFormControl, UntypedFormGroup, AbstractControl, ValidatorFn } from '@angular/forms';
import { Title } from '@angular/platform-browser';
import { DatePipe, Location } from '@angular/common';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Subscription, Observable, Subject } from 'rxjs';
import { ApiCallParams, ConfirmDialogResult, FormTemplate, MatDialogParams, SideBarLoaderParams } from '../@interfaces/eagna.interface';
import { CustomPluralPipe, GetInitialsPipe, IsNotEmptyPipe } from '../@pipes/eagna.pipe';
import { GridResponse } from '../@interfaces/grid.interface';
import { SharedService } from './shared.service';
import { CoreService } from './core.service';
import * as i0 from "@angular/core";
export declare class AppConfig {
    project: string;
    apiUrl: string;
    isProd: boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<AppConfig, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AppConfig>;
}
export declare class MatDialogService implements OnDestroy {
    private dialog;
    constructor(dialog: MatDialog);
    private _subscriptions;
    dialogRef: MatDialogRef<any, any>;
    openDialog(dialogParams: MatDialogParams): MatDialogRef<any, any>;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MatDialogService>;
}
export declare class EagnaService implements OnDestroy {
    private _document;
    private locale;
    private _matDialogService;
    private _router;
    private _location;
    private _titleService;
    private _datePipe;
    private _plural;
    private _isNotEmpty;
    private _getInitials;
    private _rendererFactory;
    private _appConfig;
    private _coreService;
    private _sharedService;
    constructor(_document: HTMLDocument, locale: string, _matDialogService: MatDialogService, _router: Router, _location: Location, _titleService: Title, _datePipe: DatePipe, _plural: CustomPluralPipe, _isNotEmpty: IsNotEmptyPipe, _getInitials: GetInitialsPipe, _rendererFactory: RendererFactory2, _appConfig: AppConfig, _coreService: CoreService, _sharedService: SharedService);
    private timestamp;
    private _isProd;
    private _subscriptions;
    getInitials(value: any): string;
    darkMode: boolean;
    private _renderer;
    isDarkMode$: Subject<boolean>;
    isDarkMode(): boolean;
    SAPConnectionErrorListener: Subject<boolean>;
    getNumAndLetterMask(howMany: number, numericOnly?: boolean, withAcceptableChars?: {
        char: string;
        includeAlsoFirstAndLast?: boolean;
    }): any[];
    setDarkMode(initial?: boolean): void;
    pageTitle(title: any): void;
    favicon(icon: any): void;
    setLoading(observable: Observable<any>, loadingTrigger: any): void;
    static MODAL_WINDOW: {
        MAX_WIDTH: string;
        MAX_HEIGHT: string;
        CONFIRM_DIALOG_WIDTH: string;
        CONFIRM_DIALOG_HEIGHT: string;
        COMPUTE_HEIGHT: (divider?: number, unit?: string) => string;
        COMPUTE_WIDTH: (divider?: number, unit?: string) => string;
    };
    openDialog(dialogParams: MatDialogParams): MatDialogRef<any, any>;
    goBack(): void;
    gotoPage(pageName: string, extraParams?: NavigationExtras, newTab?: boolean): void;
    gotoUrl(pageName: string): void;
    downloadFile(res: any, file_type?: any): void;
    exportToPdf(details: any, data: any): void;
    private _s2ab;
    arrayFilterDistinct(toFilter?: {
        arr: any[];
        byId?: string | string[];
        mapper?: {
            field: string;
            func?: "sum" | "diff";
        }[];
    }): any[];
    arraySortBy(toSort: {
        arr: any[];
        byId?: string;
    }): any[];
    arrayFilter(value: any, key: any, arrayName: any): any;
    dateMask(show: boolean): {
        guide: boolean;
        showMask: boolean;
        mask: (string | RegExp)[];
    };
    convertUTCDateToLocalDate(date: any, localeFormat?: string): string;
    transformDate(date: any, format?: any): string;
    confirmDialog(params: {
        /**
         * new ConfirmDialogModel(), instance that contains confirm dialog title, message, etc.
         */
        dialogData: any;
        /**
         * action to do when confirmed
         */
        doCallback: (result?: ConfirmDialogResult) => void;
        /**
         * action to do when not confirmed, optional
         */
        doRollback?: (result?: ConfirmDialogResult) => void;
        /**
         * MatDialogParams native configuration, e.g. panelClass
         */
        config?: MatDialogParams;
        /**
         * optionally, add confirm dialog with an option to never ask again.
         *
         * this requires at least the localStorage key
         */
        neverAskAgain?: string | {
            /**
             * localStorage key where this option is to be stored
             */
            localStorageKey?: string;
            /**
             * optionally, if disablement is somewhat computed, provide the logic, else leave it
             */
            disabled?: () => boolean;
            /**
             * To customize the checkbox label "Never ask message"
             */
            label?: string;
        };
    }): void;
    pipeDate(date: any, format?: any, alreadyDate?: any, tz?: any, locale?: any): any;
    plural(count: number, plural?: string, singular?: any): string;
    isNotEmpty(value: any): boolean;
    getCircularReplacer(): (key: any, value: any) => any;
    toFormControl(formControlTemplate: any, value?: any): UntypedFormControl;
    toFormGroup(formTemplate: any): UntypedFormGroup;
    toFormData<T>(formValue: T, isMultiple?: boolean, ref?: string): FormData;
    checkBrowser(): "other" | "edge" | "opera" | "chrome" | "ie" | "firefox" | "safari";
    mergeArrays(destination?: any[], source?: any[], byId?: any): any[];
    /**
     * Only works with the forms that has FormTemplate format
     * with {editable: true property}
     * @param formTemplate, normally used to build FormGroup for eagna-form
     * @param formGroup to listen valueChanges to
     * @apiUpdate what api to call after the change/save is triggered
     * @params apiUpdate parameters
     * @data optional, when is the caller modal, so to reflect changes e.g. data.isChanged = true
     * @extraKey optional, path to exact property e.g. data.details, then 'details' is the extraKey, can also be an array of keys
     * @callback optional, what to do after
     */
    listenEditables(formTemplate: FormTemplate[], formGroup: UntypedFormGroup, apiUpdate: (p: any) => Observable<any>, params: any, data?: any, extraKey?: string | string[], callback?: (whichKey?: any, currentFte?: any, newValue?: any) => void, appendParams?: (apiParams: any, currentFte: any, newValue: any) => any): Subscription;
    /**
     * This function will allow you to print the col def based on the response to Set Up Ag-Grid. Console log the method for the response
     *
     * @param paramData Pass in the first object of a Response from the Subscribe
     */
    ConvertApiToGridParams(paramData: any): string;
    get fetchErrorCodes(): any;
    ValidationRules: {
        inValidIf: (fn: (ctrl: AbstractControl) => boolean, customError: any) => ValidatorFn;
        uniqueInForm: (checkOnlyChanged?: boolean, key?: string, label?: string) => ValidatorFn;
    };
    isValidGridResult(obj: any): obj is GridResponse;
    private isArrayOf;
    isArrayOfObject(obj: any): obj is any[];
    isArrayOfString(obj: any): obj is string[];
    PDFHelper: {
        convertToBarCode: (d: string, config?: {
            svg?: {
                height?: number;
                fit?: number[];
                style?: string;
            };
            barcode: {
                format?: 'CODE128' | 'CODE128A' | 'CODE128B' | 'CODE128C' | 'EAN' | 'UPC' | 'EAN8' | 'EAN5' | 'EAN2' | 'CODE39' | 'ITF14' | 'MSI' | 'MSI10' | 'MSI11' | 'MSI1010' | 'MSI1110' | 'pharmacode' | 'codabar';
                lineColor?: string;
                width?: number;
                height?: number;
                displayValue?: boolean;
                text?: string;
                fontOptions?: string;
                font?: string;
                textAlign?: "center" | "left" | "right";
                textPosition?: "bottom" | "top";
                textMargin?: number;
                fontSize?: number;
                background?: string;
                margin?: number;
                marginTop?: number;
                marginBottom?: number;
                marginLeft?: number;
                marginRight?: number;
                valid?: () => void;
            };
        }) => {
            svg: string;
            height?: number;
            fit?: number[];
            style?: string;
        };
        getTableAndBarCodes: (printConfig: {
            list: string[];
            tableHeader: string;
            attributeKeys?: {
                key: string;
                dontConvert?: boolean;
            }[];
            printEmptyWith?: string;
            borderTop?: boolean;
            borderBottom?: boolean;
        }) => {
            table: any;
        };
    };
    stripHtml(html: any): string;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<EagnaService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<EagnaService>;
}
export declare class ApiCallService {
    private _eagnaService;
    private _coreService;
    constructor(_eagnaService: EagnaService, _coreService: CoreService);
    private _caller;
    isApiCallParams(obj: any): obj is ApiCallParams;
    execute(apiCallParams: ApiCallParams, requireToken?: boolean, p?: any, pipeMapForGrid?: boolean): void;
    kill(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<ApiCallService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ApiCallService>;
}
export declare class EagnaListener {
    constructor();
    sideBarComponentLoader$: EventEmitter<SideBarLoaderParams<any>>;
    static ɵfac: i0.ɵɵFactoryDeclaration<EagnaListener, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<EagnaListener>;
}
