import * as i0 from '@angular/core';
import { Injector } from '@angular/core';
import { AXPEntity, AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult } from '@acorex/platform/common';
import { AXPEntityDefinitionLoader } from '@acorex/platform/layout/entity';
import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex/platform/auth';

declare class AXMFinancialCoreModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMFinancialCoreModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMFinancialCoreModule, never, never, never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMFinancialCoreModule>;
}

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
    };
    module: {
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        currency: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        exchangeRate: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        taxClass: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        taxRegion: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        taxRule: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        paymentTerm: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        paymentMethod: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        fiscalCalendar: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        financialDimension: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

declare function currencyFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreCurrencyEntityModel {
    id: string;
    code: string;
    title: string;
    symbol: string;
    isoNumber?: string | null;
    decimalPlaces: number;
    thousandSeparator?: string | null;
    decimalSeparator?: string | null;
    formatPattern?: string | null;
    isDefault?: boolean;
    isDisabled?: boolean;
}

declare function exchangeRateFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreExchangeRateEntityModel {
    id: string;
    pairCode: string;
    title: string;
    baseCurrencyId: string;
    quoteCurrencyId: string;
    rate: number;
    inverseRate?: number;
    method?: string;
    source?: string;
    status?: string;
    effectiveFrom?: Date;
    effectiveTo?: Date | null;
    baseCurrency?: {
        id: string;
        title: string;
        symbol: string;
    };
    quoteCurrency?: {
        id: string;
        title: string;
        symbol: string;
    };
}

declare function taxClassFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreTaxClassEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    type: string;
    defaultRate: number;
    isCompound?: boolean;
    priority?: number;
    isDisabled?: boolean;
}

declare function taxRegionFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreTaxRegionEntityModel {
    id: string;
    code: string;
    title: string;
    countryCode: string;
    regionCode?: string | null;
    defaultCurrencyId?: string | null;
    taxAuthorityName?: string | null;
    isDefault?: boolean;
    isDisabled?: boolean;
}

declare function taxRuleFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreTaxRuleEntityModel {
    id: string;
    code: string;
    title: string;
    taxRegionId: string;
    taxClassId: string;
    priority?: number;
    calculationMethod: string;
    rate: number;
    thresholdAmount?: number;
    conditionSummary?: string | null;
    effectiveFrom?: Date;
    effectiveTo?: Date | null;
    isDisabled?: boolean;
}

declare function paymentTermFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCorePaymentTermEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    netDueDays: number;
    discountPercent?: number;
    discountDays?: number;
    gracePeriodDays?: number;
    autoRenew?: boolean;
    isDisabled?: boolean;
}

declare function paymentMethodFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCorePaymentMethodEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    type: string;
    provider?: string | null;
    integrationType?: string | null;
    feePercent?: number;
    settlementTimeDays?: number;
    supportsRefunds?: boolean;
    supportsRecurring?: boolean;
    instructions?: string | null;
    isDisabled?: boolean;
}

declare function fiscalCalendarFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreFiscalCalendarEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    fiscalYear: number;
    startDate: Date;
    endDate: Date;
    templateCalendarId?: string | null;
    closingPeriods?: number;
    status?: string;
    isLocked?: boolean;
    isDefault?: boolean;
}

declare function financialDimensionFactory(injector: Injector): Promise<AXPEntity>;

interface AXMFinancialCoreFinancialDimensionEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    dimensionType: string;
    parentId?: string | null;
    hierarchyPath?: string;
    displayOrder?: number;
    isLeaf?: boolean;
    isArchived?: boolean;
}

declare class AXMFinancialCoreEntityProvider implements AXPEntityDefinitionLoader {
    private readonly injector;
    get(moduleName: string, entityName: string): Promise<AXPEntity | null>;
    list(): Promise<{
        name: string;
        module: string;
    }[]>;
}

declare const AXMFinancialCoreMenuKeys: {
    readonly Root: "financial-core";
    readonly Currencies: "financial-core.currencies";
    readonly ExchangeRates: "financial-core.exchange-rates";
    readonly Divider1: "financial-core.divider-1";
    readonly TaxClasses: "financial-core.tax-classes";
    readonly TaxRegions: "financial-core.tax-regions";
    readonly TaxRules: "financial-core.tax-rules";
    readonly Divider2: "financial-core.divider-2";
    readonly PaymentTerms: "financial-core.payment-terms";
    readonly PaymentMethods: "financial-core.payment-methods";
    readonly Divider3: "financial-core.divider-3";
    readonly FiscalCalendars: "financial-core.fiscal-calendars";
    readonly Divider4: "financial-core.divider-4";
    readonly FinancialDimensions: "financial-core.financial-dimensions";
};

declare class AXMFinancialCoreMenuProvider implements AXPMenuProvider {
    private readonly entityService;
    provide(context: AXPMenuProviderContext): Promise<void>;
}

declare class AXMFinancialCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
    private readonly translationService;
    define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
}

declare const AXMFinancialCorePermissionKeys: {
    readonly FinancialCore: {
        readonly Currency: {
            readonly Management: "FinancialCore:Permission:Currency.Management";
        };
        readonly ExchangeRate: {
            readonly Management: "FinancialCore:Permission:ExchangeRate.Management";
        };
        readonly TaxClass: {
            readonly Management: "FinancialCore:Permission:TaxClass.Management";
        };
        readonly TaxRegion: {
            readonly Management: "FinancialCore:Permission:TaxRegion.Management";
        };
        readonly TaxRule: {
            readonly Management: "FinancialCore:Permission:TaxRule.Management";
        };
        readonly PaymentTerm: {
            readonly Management: "FinancialCore:Permission:PaymentTerm.Management";
        };
        readonly PaymentMethod: {
            readonly Management: "FinancialCore:Permission:PaymentMethod.Management";
        };
        readonly FiscalCalendar: {
            readonly Management: "FinancialCore:Permission:FiscalCalendar.Management";
            readonly View: "FinancialCore:Permission:FiscalCalendar.View";
            readonly Create: "FinancialCore:Permission:FiscalCalendar.Create";
            readonly Update: "FinancialCore:Permission:FiscalCalendar.Update";
            readonly Delete: "FinancialCore:Permission:FiscalCalendar.Delete";
        };
        readonly FinancialDimension: {
            readonly Management: "FinancialCore:Permission:FinancialDimension.Management";
        };
    };
};

declare class AXMFinancialCoreSearchCommandProvider extends AXPSearchCommandProvider {
    commands: AXPSearchResult[];
}

export { AXMFinancialCoreEntityProvider, AXMFinancialCoreMenuKeys, AXMFinancialCoreMenuProvider, AXMFinancialCoreModule, AXMFinancialCorePermissionDefinitionProvider, AXMFinancialCorePermissionKeys, AXMFinancialCoreSearchCommandProvider, RootConfig, currencyFactory, exchangeRateFactory, financialDimensionFactory, fiscalCalendarFactory, paymentMethodFactory, paymentTermFactory, taxClassFactory, taxRegionFactory, taxRuleFactory };
export type { AXMFinancialCoreCurrencyEntityModel, AXMFinancialCoreExchangeRateEntityModel, AXMFinancialCoreFinancialDimensionEntityModel, AXMFinancialCoreFiscalCalendarEntityModel, AXMFinancialCorePaymentMethodEntityModel, AXMFinancialCorePaymentTermEntityModel, AXMFinancialCoreTaxClassEntityModel, AXMFinancialCoreTaxRegionEntityModel, AXMFinancialCoreTaxRuleEntityModel };
