import { Injector, QueryList, TemplateRef } from '@angular/core';
import { SelectItem } from 'tn-custom-primeng/api';
import { Dialog } from 'tn-custom-primeng/dialog';
import { Operator, TextControlSchema } from '../classes/form-schema';
import { Filter, Sort, StringCompareOption } from '../models/grid-info';
import { ResponseResult } from '../models/response-result';
import { ModuleConfigService } from './module-config.service';
declare enum MenuOrientation {
    STATIC = 0,
    OVERLAY = 1,
    SLIM = 2,
    HORIZONTAL = 3
}
export declare class CommonService {
    private _moduleConfigService;
    layoutMode: MenuOrientation;
    darkMenu: boolean;
    profileMode: string;
    rotateMenuButton: boolean;
    topbarMenuActive: boolean;
    overlayMenuActive: boolean;
    staticMenuDesktopInactive: boolean;
    staticMenuMobileActive: boolean;
    menuClick: boolean;
    topbarItemClick: boolean;
    activeTopbarItem: any;
    resetMenu: boolean;
    currentActiveItem: any;
    menuHoverActive: boolean;
    test: boolean;
    tnPrefixLog: string;
    STORAGE_KEY: string;
    constructor(_moduleConfigService: ModuleConfigService);
    guid(): any;
    randomString(): any;
    randomStringWithNotDelimiter(): any;
    stringFormat(inputString: string, ...args: any[]): string;
    htmlEncode(str: any): string;
    getValueByPath(obj: any, path: string): any;
    setValueByPath(obj: any, path: string, data: any): void;
    addDays(date: Date | string, days: number): Date;
    addHours(date: Date, hours: number): Date;
    addSeconds(date: Date, seconds: number): Date;
    addWorkDays(date: any, days: any): Date;
    exportToCSV(datas: any[], columns: any[], fileName: string): void;
    private replaceSpecialCharacter;
    exportToCSV2(datas: any[], columns: any[], fileName: string): void;
    exportToCSVGroup(datas: any, columns: any[], fileName: string): void;
    convertToSelectItem(data: any, valueField: string, textField?: string, textField2?: string, prefixTextField2?: string, allowNull?: boolean): SelectItem[];
    getLabel(item: any, textField: string, textField2: string, prefixTextField2: string): any;
    convertToSelectItemMasterData(data: any, valueField?: string, textField?: string): SelectItem[];
    getTraceId: () => string;
    handleError(error: any, injector: Injector): Promise<ResponseResult>;
    onTopbarItemClick(event: any, item: any): void;
    autoOpenTopbarItem(): void;
    isHorizontal(): boolean;
    isSlim(): boolean;
    hideOverlayMenu(): void;
    onLayoutClick(): void;
    onTopbarMenuButtonClick(evt: any): void;
    showTopbarMenu(): void;
    onMenuButtonClick(event: any): void;
    toggleLeftMenu(show: any): void;
    onMenuClick($event: any): void;
    isTablet(): boolean;
    isDesktop(): boolean;
    isMobile(): boolean;
    isOverlay(): boolean;
    combineServiceCodeAndSuffix(serviceCode: string): string;
    delay(ms: number): Promise<unknown>;
    /** Begin disable editor tab */
    setAutofocusFirstControl(idElement: any): void;
    getTabDisabledHandler(): void;
    addTabDisabledHandler(event: any): void;
    disableTabToolbarEditor(): void;
    /** End disable editor tab */
    processDateInput(inputValue: any, showTime: boolean, timeOnly?: boolean): Date;
    getMaxDayInMonthAndYear(month: any, year: any): number;
    getDatasourceRangeYear(rangeYear?: number, previousYear?: number, nextYear?: number): any[];
    getCurrentYear(): number;
    getCurrentMonth(): number;
    getDynamicFormId(service: any, entity: any, action: any): string;
    getDefaultDynamicFormId(action: any): string;
    cloneObject(obj: any): any;
    setProperty(prop: any, val: any, model: any): any;
    standardizedJson(inputJson: string): string;
    triggerResizeWindow(): void;
    autoAlignDialog(dialog: Dialog): void;
    objHasNull(obj: any): boolean;
    arrayHasChanged(oldArray: any, newArray: any): boolean;
    tryParseExtractDate(dateValue: any, format: any): Date;
    getValueFromTask(keyValue: any, currentView: any, stepMetadata: any): string;
    upperFirstLetter(input: any): string;
    replaceAll(inputStr: any, search: any, replacement: any): any;
    isImage(fileName: any): boolean;
    createIframe(url: any): void;
    isIntegerString(str: string): boolean;
    hasAnyMask(): Element;
    safeStringify(data: any): string;
    compareString(value1: any, value2: any): number;
    compareDate(date1: any, date2: any): 1 | -1 | 0;
    diffDate(date1: any, date2: any): number;
    compareWithNow(date1: any): 1 | -1 | 0;
    parseDate(dateStr: any): Date;
    asyncForEach(array: any, callback: any): Promise<void>;
    orderBy(obj: any[], prop: string): any;
    groupBy(obj: any[], prop: string): any;
    distinct(array: number[]): any[];
    distinctArray(array: any[]): any[];
    distinctField(array: any[], field: any): any[];
    addDistinct(source: any[], dest: any[]): any[];
    getAndRemove(source: any[], func: Function, callBack?: Function): any[];
    toggleMenu(): void;
    stringToArrayBuffer(string: any): ArrayBuffer;
    guidEmpty(): string;
    /**
     * kiểm tra xem chuỗi có phải một guid khác với cả guidEmpty
     * @date 8/11/2022 - 11:51:31 AM
     *
     * @param {string} guid
     * @returns {boolean}
     */
    isValidGuid(guid: string): boolean;
    getDisplayVal(val: any): any;
    /**
     * TimeSpan: Trả về true nếu hai khoảng thời gian (start, end)
     * và (compareStart, compareEnd) giao nhau. Không tính
     * chỉ giao một đầu mút.
     */
    hasIntersection(start: any, end: any, compareStart: any, compareEnd: any): boolean;
    hasIntersectionDate(start: any, end: any, compareStart: any, compareEnd: any, dateFormat?: boolean): boolean;
    getOffsetInMinute(strDate1: any, strDate2: any, round?: boolean): number;
    findTemplateFromList($list: QueryList<TemplateRef<any>>, templateName: string): TemplateRef<any>;
    isSameArray(array1: any[], array2: any[]): boolean;
    reloadPage(): void;
    isNullOrWhiteSpace(input: string): boolean;
    isEmptyArrayOrNull(array: any[]): boolean;
    newFilterContainer(logic: 'and' | 'or', ...filters: Filter[]): Filter;
    newFilter(field: string, operator: Operator, value: any, valueIsField?: boolean, stringCompareOption?: StringCompareOption): Filter;
    newFilterV4(field: string, operator: Operator, value: string): Filter;
    clearClipboardStorage(): void;
    copyByStorage(val: string): void;
    pasteByStorage(): string;
    copyMessage(val: string): void;
    newBindingFilter(column: string, operator: Operator, sourceField: string, subField?: string): Filter;
    newSort(field: string, dir?: 1 | -1): Sort;
    logError(err: any): void;
    logInfo(msg: any): void;
    logInfoSimple(msg: any): void;
    matchRuleShort(str: any, rule: any): boolean;
    matchRuleExpl(str: any, rule: any): boolean;
    getResponseResultFromException(err: any): ResponseResult;
    isString(val: any): boolean;
    getTime(timeSpan: string): string;
    appendStringWithSpace(original: string, append: string, connector?: string): string;
    findLastIndex<T>(array: Array<T>, predicate: (value: T, index: number, obj: T[]) => boolean): number;
    getStartDayEndDayWeek(date?: Date): Date[];
    getStartDayEndDayInMonth(month?: number, year?: number): Date[];
    addHtmlContentWithTagAround(lstTag: any, className?: string, tagAround?: string, attributes?: any): string;
    addHtmlContent(content: string, className?: string, tagName?: string, attributes?: any): string;
    parseStringToArray(model: any, fields: string, splitBy?: string): void;
    parseArrayToString(data: any, fields: string, splitBy?: string): void;
    isMoreThanDaysFromNow(dt: Date, days?: number): boolean;
    addControlReadonly(field: string, label: string, mdWidth?: number, isHorizontallyLabel?: boolean, funcModifySchema?: (schema: TextControlSchema) => void): TextControlSchema;
}
export {};
//# sourceMappingURL=common.service.d.ts.map