import * as i0 from '@angular/core';
import { Injector } from '@angular/core';
import { AXPEntity, AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult, AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex/platform/common';
import { AXPEntityModel, AXMEntityCrudServiceImpl, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityPreloadEntity } from '@acorex/platform/layout/entity';

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

declare class AXMSystemInsightModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXMSystemInsightModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXMSystemInsightModule, never, [typeof AXMAuditLogEntityModule], never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXMSystemInsightModule>;
}

declare const RootConfig: {
    config: {
        i18n: string;
    };
    module: {
        route: string;
        module: string;
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        auditLog: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

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

interface AXMSystemInsightAuditLogEntityModel extends AXPEntityModel<string> {
    applicationName: string;
    tenantId?: string;
    tenantName?: string;
    userId?: string;
    userName?: string;
    executionTime: Date;
    executionDuration: number;
    clientIpAddress?: string;
    clientName?: string;
    clientId?: string;
    correlationId?: string;
    browserInfo?: string;
    httpMethod?: string;
    url?: string;
    httpStatusCode?: number;
    httpStatus?: string;
    exceptions?: string;
    comments?: string;
    impersonatorUserId?: string;
    impersonatorUserName?: string;
    impersonatorTenantId?: string;
    impersonatorTenantName?: string;
    extraProperties?: Record<string, any>;
    actions?: AXMSystemInsightAuditLogAction[];
    entityChanges?: AXMSystemInsightEntityChange[];
}
interface AXMSystemInsightAuditLogAction {
    serviceName?: string;
    methodName?: string;
    parameters?: string;
    executionTime: Date;
    executionDuration: number;
    extraProperties?: Record<string, any>;
}
interface AXMSystemInsightEntityChange {
    changeTime: Date;
    entityId: string;
    entityTypeFullName: string;
    changeType: string;
    propertyChanges?: AXMSystemInsightEntityPropertyChange[];
    extraProperties?: Record<string, any>;
}
interface AXMSystemInsightEntityPropertyChange {
    propertyName: string;
    propertyTypeFullName: string;
    originalValue?: string;
    newValue?: string;
}

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

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

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

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

/**
 * Provides configuration definitions for the System Insight module.
 * Covers retention policies, storage, log levels, alerting, and performance tuning.
 */
declare class AXPSystemInsightSettingProvider implements AXPSettingDefinitionProvider {
    provide(context: AXPSettingDefinitionProviderContext): Promise<void>;
}

export { AXMSystemInsightAuditLogService, AXMSystemInsightAuditLogServiceImpl, AXMSystemInsightEntityProvider, AXMSystemInsightMenuProvider, AXMSystemInsightModule, AXMSystemInsightSearchCommandProvider, AXPSystemInsightSettingProvider, RootConfig, auditLogFactory };
export type { AXMSystemInsightAuditLogAction, AXMSystemInsightAuditLogEntityModel, AXMSystemInsightEntityChange, AXMSystemInsightEntityPropertyChange };
