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 AXMMeasurementCoreModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMMeasurementCoreModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMMeasurementCoreModule, never, never, never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMMeasurementCoreModule>;
}

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
    };
    module: {
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        unitOfMeasure: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        unitConversion: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        unitOfMeasureType: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        unitOfMeasureGroup: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        quantityType: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        measurementDimension: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        measurementRange: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

interface AXMMeasurementCoreUnitOfMeasureEntityModel {
    id: string;
    code: string;
    title: string;
    symbol?: string | null;
    description?: string | null;
    typeId?: string | null;
    groupId?: string | null;
    isBaseUnit?: boolean;
    decimalPlaces?: number;
    isDisabled?: boolean;
}

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

interface AXMMeasurementCoreUnitConversionEntityModel {
    id: string;
    code: string;
    title?: string | null;
    fromUnitId: string;
    toUnitId: string;
    conversionFactor: number;
    description?: string | null;
    isDisabled?: boolean;
}

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

interface AXMMeasurementCoreUnitOfMeasureTypeEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    isDisabled?: boolean;
}

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

interface AXMMeasurementCoreUnitOfMeasureGroupEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    allowedUoms?: string[] | null;
    isDisabled?: boolean;
}

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

interface AXMMeasurementCoreQuantityTypeEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    defaultUnitId?: string | null;
    decimalPlaces?: number;
    roundingMode?: 'up' | 'down' | 'nearest' | null;
    isDisabled?: boolean;
}

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

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

interface AXMMeasurementCoreMeasurementDimensionFieldModel {
    name: string;
    quantityTypeId: string;
    sequence: number;
}
interface AXMMeasurementCoreMeasurementDimensionCalculatedFieldModel {
    name: string;
    formula: string;
    resultQuantityTypeId: string;
}
interface AXMMeasurementCoreMeasurementDimensionEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    fields: AXMMeasurementCoreMeasurementDimensionFieldModel[];
    calculatedFields?: AXMMeasurementCoreMeasurementDimensionCalculatedFieldModel[];
    isDisabled?: boolean;
}

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

interface AXMMeasurementCoreMeasurementRangeEntityModel {
    id: string;
    code: string;
    title: string;
    description?: string | null;
    quantityTypeId: string;
    targetValue?: number | null;
    minValue?: number | null;
    maxValue?: number | null;
    unitId: string;
    rangeType: 'TOLERANCE' | 'ACCEPTABLE_RANGE' | 'WARNING_RANGE';
    violationAction?: 'REJECT' | 'WARN' | 'LOG' | null;
    isDisabled?: boolean;
}

declare class AXMMeasurementCoreEntityProvider implements AXPEntityDefinitionLoader {
    private readonly injector;
    constructor(injector: Injector);
    get(moduleName: string, entityName: string): Promise<AXPEntity | null>;
    list(): Promise<{
        name: string;
        module: string;
    }[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMMeasurementCoreEntityProvider, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMMeasurementCoreEntityProvider>;
}

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

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

declare class AXMMeasurementCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
    private readonly injector;
    private readonly translationService;
    constructor(injector: Injector);
    define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMMeasurementCorePermissionDefinitionProvider, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMMeasurementCorePermissionDefinitionProvider>;
}

declare const AXMMeasurementCorePermissionKeys: {
    readonly MeasurementCore: {
        readonly Group: "MeasurementCore:Permission:Group";
        readonly UnitOfMeasure: {
            readonly Management: "MeasurementCore:Permission:UnitOfMeasure.Management";
        };
        readonly UnitConversion: {
            readonly Management: "MeasurementCore:Permission:UnitConversion.Management";
        };
        readonly UnitOfMeasureType: {
            readonly Management: "MeasurementCore:Permission:UnitOfMeasureType.Management";
        };
        readonly UnitOfMeasureGroup: {
            readonly Management: "MeasurementCore:Permission:UnitOfMeasureGroup.Management";
        };
        readonly QuantityType: {
            readonly Management: "MeasurementCore:Permission:QuantityType.Management";
        };
    };
};

export { AXMMeasurementCoreEntityProvider, AXMMeasurementCoreMenuProvider, AXMMeasurementCoreModule, AXMMeasurementCorePermissionDefinitionProvider, AXMMeasurementCorePermissionKeys, AXMMeasurementCoreSearchCommandProvider, RootConfig, measurementDimensionFactory, measurementRangeFactory, quantityTypeFactory, unitConversionFactory, unitOfMeasureFactory, unitOfMeasureGroupFactory, unitOfMeasureTypeFactory };
export type { AXMMeasurementCoreMeasurementDimensionCalculatedFieldModel, AXMMeasurementCoreMeasurementDimensionEntityModel, AXMMeasurementCoreMeasurementDimensionFieldModel, AXMMeasurementCoreMeasurementRangeEntityModel, AXMMeasurementCoreQuantityTypeEntityModel, AXMMeasurementCoreUnitConversionEntityModel, AXMMeasurementCoreUnitOfMeasureEntityModel, AXMMeasurementCoreUnitOfMeasureGroupEntityModel, AXMMeasurementCoreUnitOfMeasureTypeEntityModel };
