import type { CustomerId, ParticipantId } from './branded';
import type { ParticipantEmail, ParticipantParticipation, ParticipantRosterSlot, ParticipantSlotKey, ParticipantSubjectResolution, SingleSubjectParticipantParticipation } from './participants';
export type ContactablePersonSeed = Readonly<{
    displayName: string | null;
    email: ParticipantEmail;
    phone: string | null;
}>;
export type ProvisionalPersonSeed = Readonly<{
    displayName: string | null;
    phone: string | null;
}>;
export type PersonResolutionInput = Readonly<{
    kind: 'with_email';
    displayName: string | null;
    email: ParticipantEmail;
    phone: string | null;
    existingParticipantIdByEmail: ParticipantId | null;
}> | Readonly<{
    kind: 'without_email';
    displayName: string | null;
    phone: string | null;
}>;
export type PersonResolutionPlan = Readonly<{
    kind: 'reuse_existing_person_by_email';
    participantId: ParticipantId;
    email: ParticipantEmail;
}> | Readonly<{
    kind: 'create_contactable_person';
    seed: ContactablePersonSeed;
}> | Readonly<{
    kind: 'create_provisional_person';
    seed: ProvisionalPersonSeed;
}>;
export declare function planPersonResolution(input: PersonResolutionInput): PersonResolutionPlan;
export type CustomerPersonResolutionInput = Readonly<{
    kind: 'with_email';
    customerId: CustomerId;
    displayName: string | null;
    email: ParticipantEmail;
    phone: string | null;
    existingParticipantIdByEmail: ParticipantId | null;
}> | Readonly<{
    kind: 'without_email';
    customerId: CustomerId;
    displayName: string | null;
    phone: string | null;
}>;
export type CustomerPersonResolution = Readonly<{
    kind: 'link_existing_person_by_email';
    customerId: CustomerId;
    participantId: ParticipantId;
    email: ParticipantEmail;
}> | Readonly<{
    kind: 'create_contactable_person_for_customer';
    customerId: CustomerId;
    seed: ContactablePersonSeed;
}> | Readonly<{
    kind: 'create_provisional_person_for_customer';
    customerId: CustomerId;
    seed: ProvisionalPersonSeed;
}>;
export declare function planCustomerPersonResolution(input: CustomerPersonResolutionInput): CustomerPersonResolution;
export type ParticipationPersonResolution = Readonly<{
    kind: 'reuse_existing_person_for_slot';
    slotKey: ParticipantSlotKey;
    participantId: ParticipantId;
    participation: ParticipantParticipation;
}> | Readonly<{
    kind: 'create_contactable_person_for_slot';
    slotKey: ParticipantSlotKey;
    seed: ContactablePersonSeed;
    participation: ParticipantParticipation;
}> | Readonly<{
    kind: 'create_provisional_person_for_slot';
    slotKey: ParticipantSlotKey;
    seed: ProvisionalPersonSeed;
    participation: ParticipantParticipation;
}> | Readonly<{
    kind: 'blocked_duplicate_participant_in_booking';
    slotKey: ParticipantSlotKey;
    email: ParticipantEmail;
    conflictingSlotKeys: readonly ParticipantSlotKey[];
}>;
export declare function planParticipationPersonResolution(input: Readonly<{
    slot: ParticipantRosterSlot;
    resolution: ParticipantSubjectResolution;
}>): ParticipationPersonResolution;
export type SingleSubjectParticipantMaterializationInput = Readonly<{
    kind: 'participant_subject';
    customerId: CustomerId;
    displayName: string | null;
    email: ParticipantEmail;
    phone: string | null;
    existingParticipantIdByEmail: ParticipantId | null;
    participation: SingleSubjectParticipantParticipation;
}> | Readonly<{
    kind: 'provisional_single_subject_participant';
    customerId: CustomerId;
    displayName: string | null;
    phone: string | null;
    participation: SingleSubjectParticipantParticipation;
}>;
export type SingleSubjectParticipantMaterializationPlan = Readonly<{
    kind: 'reuse_existing_person_and_participation';
    customerId: CustomerId;
    participantId: ParticipantId;
    participation: SingleSubjectParticipantParticipation;
}> | Readonly<{
    kind: 'create_contactable_person_and_participation';
    customerId: CustomerId;
    seed: ContactablePersonSeed;
    participation: SingleSubjectParticipantParticipation;
}> | Readonly<{
    kind: 'create_provisional_person_and_participation';
    customerId: CustomerId;
    seed: ProvisionalPersonSeed;
    participation: SingleSubjectParticipantParticipation;
}>;
export declare function planSingleSubjectParticipantMaterialization(input: SingleSubjectParticipantMaterializationInput): SingleSubjectParticipantMaterializationPlan;
export type CleanupEvidence = Readonly<{
    legacyCustomerEmailCallSiteCount: number;
    unresolvedHealthRowCount: number;
    parityFailureSurfaces: readonly string[];
}>;
export type CleanupReadinessBlocker = 'legacy_customer_email_call_sites_remaining' | 'parity_failures_remaining' | 'unresolved_health_rows_remaining';
export type CleanupReadiness = Readonly<{
    kind: 'ready';
    evidence: CleanupEvidence;
    blockers: readonly [];
}> | Readonly<{
    kind: 'blocked';
    evidence: CleanupEvidence;
    blockers: readonly CleanupReadinessBlocker[];
}>;
export declare function planCleanupReadiness(evidence: CleanupEvidence): CleanupReadiness;
