import * as i0 from '@angular/core';
import { Injector } from '@angular/core';
import * as i11 from '@acorex/platform/layout/widget-core';
import { AXPMetaDataDefinition } from '@acorex/platform/layout/widget-core';
import * as i13 from '@acorex/components/media-viewer';
import * as i14 from '@acorex/platform/workflow';
import { AXPEntity, AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult, AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex/platform/common';
import { AXPEntityModel, AXMEntityCrudServiceImpl, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityPreloadEntity } from '@acorex/platform/layout/entity';
import { AXPApplicationUserReference, AXPFileListItem, AXPMetaData } from '@acorex/platform/core';

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

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

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

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

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

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

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

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

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

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

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

declare class AXMDocumentManagementModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDocumentManagementModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMDocumentManagementModule, never, [typeof AXMDriveChooseModule, typeof AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, typeof AXMDocumentManagementDocumentTypeMetaValueEntityModule, typeof AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, typeof AXMDocumentManagementDocumentTypeEntityModule, typeof AXMDocumentManagementDocumentEntityModule, typeof AXMFolderEntityModule, typeof AXMReviewEntityModule, typeof AXMDistributionEntityModule, typeof AXMDistributionInteractionEntityModule, typeof i11.AXPWidgetCoreModule, typeof AXMFileTypeModule, typeof i13.AXMediaViewerModule, typeof i14.AXPWorkflowModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMDocumentManagementModule>;
}

declare const RootConfig: {
    config: {
        i18n: string;
    };
    module: {
        module: string;
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        documentRelated: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        distributionInteraction: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        distribution: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        review: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        folder: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        document: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        documentType: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        documentTypeMetaDefinition: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        documentTypeMetaValue: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        documentTypeStatus: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

declare function documentFactory(injector: Injector): Promise<AXPEntity | null>;

declare function folderFactory(injector: Injector): Promise<AXPEntity | null>;

declare function documentTypeFactory(injector: Injector): Promise<AXPEntity | null>;

interface DocumentTypeFileOutput {
    selectedItems: Array<{
        name: string;
        title: string;
        icon: string;
    }>;
    context: {
        [key: string]: any;
    };
}
interface AXMDocumentManagementDocumentTypeEntityModel extends AXPEntityModel<string> {
    name: string;
    title: string;
    maxSize: number;
    isEncrypted: boolean;
    enableVersioning: boolean;
    enableExpiration: boolean;
    requiresReview: boolean;
    requiresDistribution: boolean;
    reviewFirst?: boolean;
    metaDataList: AXPMetaDataDefinition[];
    type: DocumentTypeFileOutput;
}

declare abstract class AXMDocumentTypeService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDocumentTypeEntityModel> {
    abstract getByName(name: string): Promise<AXMDocumentManagementDocumentTypeEntityModel>;
}
declare class AXMDocumentTypeServiceImpl extends AXMDocumentTypeService {
    constructor();
    getByName(name: string): Promise<AXMDocumentManagementDocumentTypeEntityModel>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDocumentTypeServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDocumentTypeServiceImpl>;
}

declare function reviewFactory(injector: Injector): Promise<AXPEntity | null>;

interface AXMDocumentManagementReviewEntityModel extends AXPEntityModel<string> {
    id: string;
    documentId: string;
    document?: AXMDocumentManagementDocumentEntityModel;
    version: number;
    reviewerId: string;
    reviewer?: AXPApplicationUserReference;
    reviewStatus: 'Pending' | 'Approved' | 'Rejected';
    reviewComment?: string;
    reviewedAt?: Date;
    modifiedBy?: AXPApplicationUserReference;
    modifiedAt?: Date;
}

declare abstract class AXMReviewService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementReviewEntityModel> {
}
declare class AXMReviewServiceImpl extends AXMReviewService {
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMReviewServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMReviewServiceImpl>;
}

type AXMDocumentWorkflowPhase = 'Draft' | 'PendingReview' | 'Rejected' | 'Reviewed' | 'Distributed' | 'Completed';
interface AXMDocumentMeta {
    name: string;
    title: string;
    value: string;
}
interface AXMDocumentManagementDocumentEntityModel extends AXPEntityModel<string> {
    name: string;
    title: string;
    documentType: AXMDocumentManagementDocumentTypeEntityModel;
    parentId: string;
    fileId: string | AXPFileListItem | any;
    refRecordId?: string;
    refEntity?: string;
    description?: string;
    size: number;
    version?: number;
    reviewRecordId?: string;
    expirationDate?: Date;
    fileData?: AXPFileListItem[];
    status?: AXMDocumentWorkflowPhase;
    documentReview?: AXMDocumentManagementReviewEntityModel;
    metaDataForm?: AXPMetaData;
}
interface GetNextStatusOptions {
    current: AXMDocumentWorkflowPhase;
    requiresReview: boolean;
    requiresDistribution: boolean;
    reviewFirst: boolean;
    reviewResult?: 'approved' | 'rejected';
    allSignaturesCollected?: boolean;
}
declare function getNextStatus(options: GetNextStatusOptions): AXMDocumentWorkflowPhase | null;
declare function canTransition(from: AXMDocumentWorkflowPhase, to: AXMDocumentWorkflowPhase): boolean;

type AXMDocumentInheritanceType = 'Extends' | 'Inherited' | 'None';
interface AXMDocumentManagementFolderEntityModel extends AXPEntityModel<string> {
    name: string;
    color: string;
    description?: string;
    parentId?: string;
    isSystem: boolean;
    isHidden: boolean;
    isDeleted: boolean;
    createdByUser?: any;
    updatedByUser?: any;
    tenantId?: string;
    userId?: string;
    documentTypes?: AXMDocumentManagementDocumentTypeEntityModel[];
    parent?: AXMDocumentManagementFolderEntityModel;
    folders?: AXMDocumentManagementFolderEntityModel[];
    documents?: AXMDocumentManagementDocumentEntityModel[];
    nodeCount?: number;
    size: number;
    inherit: AXMDocumentInheritanceType;
}
interface AXMDocumentManagementFolderCreateDto {
    name: string;
    color: string;
    size: number;
    description?: string;
    parentId?: string;
    documentTypes?: AXMDocumentManagementDocumentTypeEntityModel[];
    tenantId?: string;
    userId?: string;
    inherit: AXMDocumentInheritanceType;
}
interface AXMDocumentManagementFolderGetDto extends AXMDocumentManagementFolderEntityModel {
    createdByUser?: any;
    updatedByUser?: any;
    parent?: AXMDocumentManagementFolderEntityModel;
    folders?: AXMDocumentManagementFolderEntityModel[];
    documents?: AXMDocumentManagementDocumentEntityModel[];
}

declare abstract class AXMFolderService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementFolderEntityModel, AXMDocumentManagementFolderEntityModel, AXMDocumentManagementFolderCreateDto> {
    abstract getPath(folderId: string, stopFolderId?: string): Promise<AXMDocumentManagementFolderEntityModel[]>;
    abstract searchFolders(searchTerm: string, rootFolderId: string): Promise<AXMDocumentManagementFolderEntityModel[]>;
}
declare class AXMFolderServiceImpl extends AXMFolderService {
    constructor();
    getPath(_: string): Promise<AXMDocumentManagementFolderEntityModel[]>;
    searchFolders(_searchTerm: string, _rootFolderId: string): Promise<AXMDocumentManagementFolderEntityModel[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMFolderServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMFolderServiceImpl>;
}

declare abstract class AXMDocumentService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDocumentEntityModel> {
    abstract getPath(documentId: string, stopFolderId?: string): Promise<AXMDocumentManagementFolderEntityModel[]>;
    abstract searchFiles(searchTerm: string, rootFolderId: string): Promise<AXMDocumentManagementDocumentEntityModel[]>;
    abstract findMany(ids: string[]): Promise<AXMDocumentManagementDocumentEntityModel[]>;
}
declare class AXMDocumentServiceImpl extends AXMDocumentService {
    constructor();
    getPath(_: string): Promise<AXMDocumentManagementFolderEntityModel[]>;
    searchFiles(_searchTerm: string, _rootFolderId: string): Promise<AXMDocumentManagementDocumentEntityModel[]>;
    findMany(ids: string[]): Promise<AXMDocumentManagementDocumentEntityModel[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDocumentServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDocumentServiceImpl>;
}

declare function documentTypeMetaDefinitionfactory(injector: Injector): Promise<AXPEntity | null>;

interface AXMDocumentManagementDocumentTypeMetaDefinitionEntityModel extends AXPEntityModel<string> {
    name: string;
    title: string;
}

declare abstract class AXMDocumentManagementDocumentTypeMetaDefinitionEntityService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModel> {
}
declare class AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaDefinitionEntityService {
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl>;
}

declare function documentTypeMetaValueFactory(injector: Injector): Promise<AXPEntity | null>;

interface AXMDocumentManagementDocumentTypeMetaValueEntityModel extends AXPEntityModel<string> {
    name: string;
    title: string;
}

declare abstract class AXMDocumentManagementDocumentTypeMetaValueEntityService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDocumentTypeMetaValueEntityModel> {
}
declare class AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaValueEntityService {
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl>;
}

declare function documentTypeStatusDefinitionFactory(injector: Injector): Promise<AXPEntity | null>;

interface AXMDocumentManagementDocumentTypeStatusDefinitionEntityModel extends AXPEntityModel<string> {
    name: string;
    title: string;
}

declare abstract class AXMDocumentManagementDocumentTypeStatusDefinitionEntityService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModel> {
}
declare class AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeStatusDefinitionEntityService {
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl>;
}

declare function documentRelatedFactory(injector: Injector): Promise<AXPEntity | null>;

declare function distributionFactory(injector: Injector): Promise<AXPEntity | null>;

interface AXMDocumentManagementDistributionEntityModel extends AXPEntityModel<string> {
    documentId: string;
    document?: AXMDocumentManagementDocumentEntityModel;
    version?: number;
    assignedTo: any;
    dueDate?: Date;
    /** Number of distinct users who have viewed the distribution */
    viewedCount?: string;
    /** Number of distinct users who have signed the distribution */
    signedCount?: string;
    /** Overall status derived from signed vs assigned counts */
    status?: 'done' | 'in-progress';
}

declare abstract class AXMDistributionService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDistributionEntityModel> {
}
declare class AXMDistributionServiceImpl extends AXMDistributionService {
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDistributionServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDistributionServiceImpl>;
}

declare function distributionInteractionFactory(injector: Injector): Promise<AXPEntity | null>;

interface AXMDocumentManagementDistributionInteractionEntityModel extends AXPEntityModel<string> {
    documentDistributionId: string;
    action: 'Viewed' | 'Signed' | 'Fake';
    actionTime?: Date;
    signatureType?: 'Digital' | 'Manual';
    signatureData?: string;
}
interface AXMDistributionInteractionSummary {
    id: string;
    createdBy: string;
    hasViewed: boolean;
    lastViewDate?: Date;
    hasSigned: boolean;
    lastSignDate?: Date;
    totalInteractions: number;
    user: any;
}

declare abstract class AXMDistributionInteractionService extends AXMEntityCrudServiceImpl<string, AXMDocumentManagementDistributionInteractionEntityModel, any> {
}
declare class AXMDistributionInteractionServiceImpl extends AXMDistributionInteractionService {
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMDistributionInteractionServiceImpl, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMDistributionInteractionServiceImpl>;
}

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

declare class AXMEntityProvider implements AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader {
    private injector;
    preload(): AXPEntityPreloadEntity[];
    get(moduleName: string, entityName: string): Promise<AXPEntity | null>;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMEntityProvider, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMEntityProvider>;
}

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

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

declare class AXMSettingProvider implements AXPSettingDefinitionProvider {
    provide(context: AXPSettingDefinitionProviderContext): Promise<void>;
}

export { AXMDistributionEntityModule, AXMDistributionInteractionEntityModule, AXMDistributionInteractionService, AXMDistributionInteractionServiceImpl, AXMDistributionService, AXMDistributionServiceImpl, AXMDocumentManagementDocumentEntityModule, AXMDocumentManagementDocumentTypeEntityModule, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, AXMDocumentManagementDocumentTypeMetaDefinitionEntityService, AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, AXMDocumentManagementDocumentTypeMetaValueEntityModule, AXMDocumentManagementDocumentTypeMetaValueEntityService, AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, AXMDocumentManagementDocumentTypeStatusDefinitionEntityService, AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, AXMDocumentManagementModule, AXMDocumentReletedEntityModule, AXMDocumentService, AXMDocumentServiceImpl, AXMDocumentTypeService, AXMDocumentTypeServiceImpl, AXMEntityProvider, AXMFolderEntityModule, AXMFolderService, AXMFolderServiceImpl, AXMMenuProvider, AXMReviewEntityModule, AXMReviewService, AXMReviewServiceImpl, AXMSearchCommandProvider, AXMSettingProvider, RootConfig, canTransition, distributionFactory, distributionInteractionFactory, documentFactory, documentRelatedFactory, documentTypeFactory, documentTypeMetaDefinitionfactory, documentTypeMetaValueFactory, documentTypeStatusDefinitionFactory, folderFactory, getNextStatus, reviewFactory };
export type { AXMDistributionInteractionSummary, AXMDocumentInheritanceType, AXMDocumentManagementDistributionEntityModel, AXMDocumentManagementDistributionInteractionEntityModel, AXMDocumentManagementDocumentEntityModel, AXMDocumentManagementDocumentTypeEntityModel, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModel, AXMDocumentManagementDocumentTypeMetaValueEntityModel, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModel, AXMDocumentManagementFolderCreateDto, AXMDocumentManagementFolderEntityModel, AXMDocumentManagementFolderGetDto, AXMDocumentManagementReviewEntityModel, AXMDocumentMeta, AXMDocumentWorkflowPhase, DocumentTypeFileOutput };
