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

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

declare const AXMPermissionsKeys: {
    SubscriptionManagement: {
        Management: string;
        Subscriptions: {
            Management: string;
        };
        SubscriptionPlans: {
            Management: string;
        };
    };
};

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
    };
    module: {
        route: string;
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        subscription: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        subscriptionPlan: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        subscriptionPlanItem: {
            name: string;
            source: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

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

interface AXMSubscriptionManagementSubscriptionEntityModel extends AXPEntityModel<string> {
    subscriberType: string;
    subscriberId: string;
    subscriber?: {
        id: string;
        title?: string;
        displayName?: string;
    };
    planId?: string;
    plan?: {
        id: string;
        title: string;
        description?: string;
        subscribableType?: string;
    };
    title?: string;
    description?: string;
    statusId?: string;
    status?: {
        id: string;
        title: string;
    };
    startDate: Date;
    endDate?: Date;
    notes?: string;
    meta?: Record<string, any>;
    createdAt?: Date;
    updatedAt?: Date;
}

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

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

interface AXMSubscriptionManagementSubscriptionPlanEntityModel extends AXPEntityModel<string> {
    title: string;
    description?: string;
    code?: string;
    price?: number;
    currencyId?: string;
    currency?: {
        id: string;
        code: string;
        symbol: string;
    };
    billingCycle?: 'monthly' | 'quarterly' | 'yearly';
    isDisabled?: boolean;
    meta?: Record<string, any>;
    createdAt?: Date;
    updatedAt?: Date;
}

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

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

interface AXMSubscriptionManagementSubscriptionPlanItemEntityModel extends AXPEntityModel<string> {
    planId: string;
    plan?: {
        id: string;
        title: string;
        description?: string;
    };
    subscribableType: string;
    editionId: string;
    edition?: {
        id: string;
        title: string;
        description?: string;
    };
    meta?: Record<string, any>;
    createdAt?: Date;
    updatedAt?: Date;
}

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

declare class AXMSubscriptionManagementEntityProvider 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<AXMSubscriptionManagementEntityProvider, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXMSubscriptionManagementEntityProvider>;
}

/**
 * Subscription Management Feature Definition Provider.
 * Provides feature definitions for the Subscription Management module.
 */
declare class AXMSubscriptionManagementFeatureDefinitionProvider implements AXPFeatureDefinitionProvider {
    provide(context: AXPFeatureDefinitionProviderContext): Promise<void>;
}

declare const AXMSubscriptionManagementFeatureKeys: {};

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

declare const AXMSubscriptionManagementMenuKeys: {
    readonly Root: "SubscriptionManagement:Menu";
    readonly Subscriptions: "SubscriptionManagement:Menu:Subscriptions";
    readonly SubscriptionPlans: "SubscriptionManagement:Menu:SubscriptionPlans";
};

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

export { AXMPermissionsKeys, AXMSubscriptionManagementEntityProvider, AXMSubscriptionManagementFeatureDefinitionProvider, AXMSubscriptionManagementFeatureKeys, AXMSubscriptionManagementMenuKeys, AXMSubscriptionManagementMenuProvider, AXMSubscriptionManagementModule, AXMSubscriptionManagementSearchProvider, AXMSubscriptionManagementSubscriptionEntityService, AXMSubscriptionManagementSubscriptionEntityServiceImpl, AXMSubscriptionManagementSubscriptionPlanEntityService, AXMSubscriptionManagementSubscriptionPlanEntityServiceImpl, AXMSubscriptionManagementSubscriptionPlanItemEntityService, AXMSubscriptionManagementSubscriptionPlanItemEntityServiceImpl, RootConfig, subscriptionEntityFactory, subscriptionPlanEntityFactory, subscriptionPlanItemEntityFactory };
export type { AXMSubscriptionManagementSubscriptionEntityModel, AXMSubscriptionManagementSubscriptionPlanEntityModel, AXMSubscriptionManagementSubscriptionPlanItemEntityModel };
