import AppProcess, { AppProcessPrimitiveProps, AppProcessProps } from '../../../../protection-plan/domain/models/app-process';
import { DeviceShareInfo } from '../../../../protection-plan/domain/models/device-share-info';
import PlanShare from '../../../../protection-plan/domain/models/plan-share';
import ProcessStep from '../../../../protection-plan/domain/models/proccess-step';
import PersonalProtectionPlan, { ProtectionPlanPrimitiveProps } from '../../../../protection-plan/domain/models/personal-protection-plan';
interface LoadedShareData {
    type: string;
    data: string[] | DeviceShareInfo;
    isBackup: boolean;
}
export type CollectedSharesData = LoadedShareData & {
    id: string;
};
export interface RevealOptions {
    timeoutMinutes: number;
}
export interface MergingProcessProps extends AppProcessProps<any> {
    plan: PersonalProtectionPlan;
    planType: 'BACKUP' | 'INHERITANCE';
    backupStore?: any[];
    loadedShares?: {
        [shareId: string]: LoadedShareData;
    };
    activated: boolean;
    triggersRequestedAt?: Date | null;
    selectedBeneficiariesIds: string[];
    mergeAuthorityId: string;
    revealOptions?: RevealOptions;
    expiresAt?: Date;
    pendingTrigger?: {
        id: string;
        startedAt: Date;
        expiresAt: Date;
    };
}
export interface MergingProcessPrimitiveProps extends Omit<AppProcessPrimitiveProps<any>, 'plan'> {
    plan: ProtectionPlanPrimitiveProps;
    planType: 'BACKUP' | 'INHERITANCE';
    backupStore?: any[];
    loadedShares?: {
        [shareId: string]: LoadedShareData;
    };
    activated: boolean;
    triggersRequestedAt?: Date | null;
    selectedBeneficiariesIds: string[];
    mergeAuthorityId: string;
    revealOptions?: RevealOptions;
    expiresAt?: Date;
    pendingTrigger?: {
        id: string;
        startedAt: Date;
        expiresAt: Date;
    };
}
interface MergingProcessParam {
    id: string;
    plan: PersonalProtectionPlan;
    planType: 'BACKUP' | 'INHERITANCE';
    triggersRequestedAt?: Date | null;
    selectedBeneficiariesIds: string[];
    mergeAuthorityId: string;
    expiresAt?: Date;
}
export default class MergingProcess extends AppProcess<MergingProcessProps, any> {
    constructor(props: MergingProcessProps);
    get allSharesLoaded(): boolean;
    get requiresSmartContract(): boolean;
    get isLegacyPlan(): boolean;
    get selectedBeneficiariesIds(): string[];
    get isCollectingMaShare(): boolean;
    get currentStep(): ProcessStep<any>;
    get planIsReleased(): boolean;
    get hasLoadedShares(): boolean;
    get plan(): PersonalProtectionPlan;
    get planRequiresMobileEndToEndEncryption(): boolean;
    get isActivated(): boolean;
    get ownerId(): string;
    get remainingColdShares(): PlanShare[] | undefined;
    get mergeAuthorityColdShare(): PlanShare | undefined;
    get remainingAdditionalColdShares(): PlanShare[];
    get remainingAdditionalMobileShareholdersIds(): string[];
    get planValidatorShares(): PlanShare[];
    get planMainChain(): import("../storage-option").PlanStorageOption;
    get isCollectingColdShares(): boolean;
    get selectedAdditionalPlanColdShares(): PlanShare[];
    get selectedAdditionalPlanMobileShares(): PlanShare[];
    get mobileShareInvitationSent(): boolean;
    get selectedAdditionalPlanMobileSharesAmount(): number;
    get selectedAdditionalPlanColdSharesAmount(): number;
    get planTitle(): string;
    get planCode(): string;
    get planType(): "BACKUP" | "INHERITANCE";
    get isBackupPlan(): boolean;
    get isInheritancePlan(): boolean;
    get planId(): string;
    get canBeMerged(): boolean;
    get planContractAddress(): string | undefined;
    get isPlanFree(): boolean | undefined;
    get allAdditionalColdSharesLoaded(): boolean;
    get mergeAuthorityShare(): PlanShare | undefined;
    get mergeAuthorityShareLoaded(): boolean;
    get allAdditionalMobileSharesLoaded(): boolean;
    get collectedShares(): CollectedSharesData[];
    get triggersRequestedAt(): Date | undefined;
    get backupStore(): any[] | undefined;
    get pendingTrigger(): {
        startedAt: Date;
        expiresAt: Date;
        id: string;
    } | undefined;
    private get activeStepIndex();
    static create(props: MergingProcessParam): MergingProcess;
    static buildInitialSteps(props: {
        plan: PersonalProtectionPlan;
        mergeAuthorityId: string;
        selectedBeneficiariesIds: MergingProcessParam["selectedBeneficiariesIds"];
    }): ProcessStep<unknown>[];
    static fromPrimitives(props: MergingProcessPrimitiveProps): MergingProcess;
    reset(): void;
    completeStep(step: ProcessStep<any>): void;
    completeStepById(stepId: string): void;
    markAsInProgress(stepId: string): void;
    isStepCompleted(stepId: string): boolean;
    complete(): void;
    setBackupSharesCollecting(): void;
    setBackupSharesCollected(shareData: any[]): void;
    setValidatorShareCollecting(): void;
    setValidatorShareCollected(shareData: any): void;
    setMobileShareCollected(share: PlanShare, shareData: any): void;
    setColdShareCollecting(share: PlanShare): void;
    setColdShareCollected(share: PlanShare, shareData: any): void;
    isShareCollected(share: PlanShare): boolean;
    toPrimitives(): MergingProcessPrimitiveProps;
    activate(): void;
    setMergeExpiration(mergeExpiresAt: Date): void;
    filterSelectedShares(shares: PlanShare[]): PlanShare[];
    private ensureAllParamsAreValid;
    private markNextAsInProgress;
    private setLoadedShare;
}
export {};
