import { DatePipe } from '@angular/common';
import { Injector, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subject } from 'rxjs';
import { ApplicationContextService } from '../../app-context/application-context.service';
import { ComponentContextService } from '../../app-context/component-context.service';
import { PermissionBase } from '../../enums/common';
import { ExportItem } from '../../models/export-item';
import { Filter, Sort, StringCompareOption } from '../../models/grid-info';
import { ResponseResult } from '../../models/response-result';
import { BaseService } from '../../services/base.service';
import { CommonService } from '../../services/common.service';
import { CrudService } from '../../services/crud.service';
import { CrudListSetting, FormSchemaBase, ModelSchema, Operator, PopupSize } from '../form-schema';
export declare const EXPORT_VERSION_V4 = 4;
export declare const EXPORT_VERSION_V5 = 5;
export declare abstract class ComponentBase implements OnDestroy {
    parentModel: any;
    set parentContext(value: ComponentContextService);
    get parentContext(): ComponentContextService;
    model: any;
    modelSchema: ModelSchema[];
    context: ComponentContextService;
    rootModel: any;
    rootContext: ComponentContextService;
    guidEmpty: string;
    _unsubscribeAll: Subject<any>;
    protected _commonService: CommonService;
    protected _appContext: ApplicationContextService;
    protected _componentContext: ComponentContextService;
    protected _injector: Injector;
    protected _activatedRoute: ActivatedRoute;
    protected _crudService: CrudService;
    protected _datePipe: DatePipe;
    constructor(injector: Injector, componentName?: string);
    /**
     * On destroy
     */
    ngOnDestroy(): void;
    getComponentId(): string;
    subscribeRoot(name: string, callBack: any): void;
    subscribe(name: string, callBack: any): void;
    subscribeOnce(name: string, callBack: any): void;
    replaySubscribe(name: string, callBack: any): void;
    trackByFuncDefault(index: any, item: any): any;
    trackByFuncId(index: any, item: any): any;
    handleResponse(res: ResponseResult, message?: string, callBack?: Function, callBackError?: Function): void;
    handleResponseWithWaitBox(res: ResponseResult, message?: string, callBack?: Function, callBackError?: Function): void;
    isNotNullArray(arr: any): boolean;
    funcSortDefault(a: any, b: any): 1 | -1 | 0;
    export(data: ExportItem, version?: number): Promise<ResponseResult>;
    exportExcelV5(data: any, templateCode: string, fileName: string): Promise<ResponseResult>;
    exportV4(data: ExportItem): Promise<ResponseResult>;
    exportV5(data: ExportItem): Promise<ResponseResult>;
    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;
    newBindingFilter(column: string, operator: Operator, sourceField: string, subField?: string): Filter;
    newSort(field: string, dir?: 1 | -1): Sort;
    newPopupSize(width: number, height: number, maximize?: boolean): PopupSize;
    showWaitBox(message?: string): void;
    hideWaitBox(): void;
    copyToClipboard: (str: any) => void;
    addDistinct(lst: any, value: any): void;
    addDistinctList(lst: any, lstValue: any): void;
    /**
    * Convert 1 array => N array
    * @param lst Mảng phần tử
    * @param fields Mảng các field, nếu field là kiểu array thì nghĩa là mún map distinct
    * @returns N Array
    */
    multipleMap(lst: any, ...fields: any[]): any[];
    _printPdf(baseService: BaseService, id: string, rowData: any): Promise<ResponseResult>;
    _printPdfBySchema(baseService: BaseService, model: any, schemas: FormSchemaBase[]): Promise<ResponseResult>;
    private _printPdfBase;
    private getLabel;
    private _getValueFromDatasource;
    _getKeyValue(result: any[], prefix: string, schemas: FormSchemaBase[], model: any): Promise<any[]>;
    getStringDate(value: any): string;
    parseAttachLink(content: any): any[];
    private parseQueryString;
    getCopyPath(setting: CrudListSetting, rowData: any, permission?: PermissionBase): Promise<string>;
    getLinkState(rowData: any): Promise<string>;
    getDefaultSettings(): {
        [key: string]: string;
    };
    tryParseJson(data: any): {
        valid: boolean;
        value: any;
    };
    tryParseNumber(data: string, defaultValue?: number): {
        valid: boolean;
        value: number;
    };
    counter(i: number): any[];
}
//# sourceMappingURL=component-base.d.ts.map