import { NgForm } from '@angular/forms';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import * as i3 from '@sellan/core';
import { ISimpleComboboxItem, Startup, AjaxService, IEntityResponse, CoreClientGrid, PopupResults, IComboboxUriDescriptionService } from '@sellan/core';
import { Observable } from 'rxjs';
import * as i0 from '@angular/core';
import { OnInit, AfterViewInit, ChangeDetectorRef } from '@angular/core';
import { Sort } from '@angular/material/sort';

interface FiancialBalanceCell {
    line: number;
    value: number;
}
declare class FiancialBalance {
    quarter?: number;
    year: number;
    description: string;
    lines: FiancialBalanceCell[];
    constructor();
}
declare class FinancialReport {
    isFilledCorrectly: boolean;
    isSimplifiedFinancialBalance: boolean;
    unit: ISimpleComboboxItem;
    isFromExternalSource: boolean;
    periods: FiancialBalance[];
    constructor();
}

declare enum FinancialStatementPeriod {
    Current = 0,
    Past = 1,
    Last = 2
}
declare class FinancialPeriod {
    year: number;
    quarter: number;
    type: FinancialStatementPeriod;
    constructor(type: FinancialStatementPeriod, y: number, q?: number);
    description(): string;
    private _queterDesc;
}

declare class FinancialStatementReport {
    isFilledCorrectly: boolean;
    isSimplifiedFinancialBalance: boolean;
    unit: ISimpleComboboxItem;
    periods: FinancialPeriod[];
    rows: FinancialStatementRowItem[];
    isFromExternalSource: boolean;
}
declare class FinancialStatementRowItem {
    isSection?: boolean;
    sectionDescription?: string;
    sectionCode: string;
    description?: string;
    rowCode?: string;
    currentPeriod?: number;
    pastPeriod?: number;
    lastPriod?: number;
    isSimplified?: boolean;
    isReadonly?: boolean;
}

declare class FinancialStatementSerivce {
    private _startUp;
    private _ajaxM;
    constructor(_startUp: Startup, _ajaxM: AjaxService);
    recalculate(period: FinancialPeriod, rows: FinancialStatementRowItem[]): void;
    valueSubstitution(rows: FinancialStatementRowItem[]): void;
    initReport(report: FinancialReport): FinancialStatementReport;
    loadFinancialReport(inn: string, fileId: string, multiOrganizationId?: number): Observable<any>;
    saveFinancialReport(report: FinancialStatementReport): Observable<IEntityResponse>;
    private _getValue;
    private _getLocalisationConfiguration;
    private _toRows;
    private _fromRows;
    getTabConfig(): {
        title: string;
        sectionCodes: string[];
    }[];
    private _defaultGet;
    static ɵfac: i0.ɵɵFactoryDeclaration<FinancialStatementSerivce, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<FinancialStatementSerivce>;
}

declare class EconomicFinancialFormComponent extends CoreClientGrid<FinancialStatementRowItem> implements OnInit, AfterViewInit {
    dialog: MatDialog;
    private _financeStatementService;
    private _cdRef;
    private _popupM;
    fileId?: string;
    multiOrganizationId?: number;
    inn: string;
    report: FinancialStatementReport;
    tabConfig: any;
    reliabilityReport: boolean;
    selectedSectionCode: Array<string>;
    autoCalculatedRowCodes: string[];
    constructor(dialog: MatDialog, _financeStatementService: FinancialStatementSerivce, _cdRef: ChangeDetectorRef, _popupM: PopupResults);
    isAutoCalculatedRow(row: FinancialStatementRowItem): boolean;
    getMaxContentHeight(): Object;
    ngOnInit(): void;
    dataSource(): FinancialStatementRowItem[];
    sortingLogic(sort: Sort): void;
    onValuesChange(rowCode: string, period: FinancialPeriod, $event: any): void;
    onSimplifiedChange($event: any): void;
    filterDataSourceBySectionCodes($event: any): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<EconomicFinancialFormComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<EconomicFinancialFormComponent, "economic-financial-form", never, { "fileId": { "alias": "fileId"; "required": false; }; "multiOrganizationId": { "alias": "multiOrganizationId"; "required": false; }; "inn": { "alias": "inn"; "required": false; }; }, {}, never, never, false, never>;
}

declare class EconomicFinancialStatementWindowOption {
    fileId: string;
    multiOrganizationId?: number;
    inn: string;
}
declare class EconomicFinancialStatementWindow {
    dialogRef: MatDialogRef<EconomicFinancialStatementWindow>;
    data: EconomicFinancialStatementWindowOption;
    private _service;
    private _popUp;
    showCloseConfirmDialog: boolean;
    newForm: NgForm;
    financialStatement: EconomicFinancialFormComponent;
    constructor(dialogRef: MatDialogRef<EconomicFinancialStatementWindow>, data: EconomicFinancialStatementWindowOption, _service: FinancialStatementSerivce, _popUp: PopupResults);
    save(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<EconomicFinancialStatementWindow, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<EconomicFinancialStatementWindow, "economic-financial-form-dialog", never, { "showCloseConfirmDialog": { "alias": "showCloseConfirmDialog"; "required": false; }; }, {}, never, never, false, never>;
}

declare class EconomicComboboxUriDescriptionService implements IComboboxUriDescriptionService {
    private _startUp;
    constructor(_startUp: Startup);
    getUri(code: string): string;
    getLocalSourse(code: string): Observable<IEntityResponse>;
    static ɵfac: i0.ɵɵFactoryDeclaration<EconomicComboboxUriDescriptionService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<EconomicComboboxUriDescriptionService>;
}

declare class EconomicModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<EconomicModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<EconomicModule, [typeof EconomicFinancialFormComponent, typeof EconomicFinancialStatementWindow], [typeof i3.CoreMatModule, typeof i3.CoreBaseModule, typeof i3.CoreControlModule, typeof i3.CoreDialogModule, typeof i3.CoreModule], [typeof EconomicFinancialFormComponent, typeof EconomicFinancialStatementWindow]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<EconomicModule>;
}

export { EconomicComboboxUriDescriptionService, EconomicFinancialFormComponent, EconomicFinancialStatementWindow, EconomicFinancialStatementWindowOption, EconomicModule, FiancialBalance, FinancialPeriod, FinancialReport, FinancialStatementPeriod, FinancialStatementReport, FinancialStatementRowItem, FinancialStatementSerivce };
export type { FiancialBalanceCell };
