import type { ITransportAdapter } from '../remoting/ITransportAdapter';
import type { IMailbox, IMailboxOptions } from './IMailbox';
/**
 * Factory options for creating mailboxes.
 */
export interface IMailboxFactoryOptions {
    /**
     * Default options applied to all created mailboxes.
     * Individual mailbox options override these.
     */
    defaultMailboxOptions?: IMailboxOptions;
}
/**
 * Factory for creating mailboxes.
 *
 * Responsibilities:
 * - Creates mailboxes with unique addresses
 * - Prevents duplicate addresses (throws if exists)
 * - Tracks all created mailboxes for lifecycle management
 * - Provides cleanup via closeAll()
 *
 * Usage:
 * ```typescript
 * const factory = new MailboxFactory(transport);
 * const mailbox = factory.create('actor.$inbox');
 * mailbox.claim();
 * ```
 */
export declare class MailboxFactory {
    private readonly transport;
    private readonly mailboxes;
    private readonly defaultOptions;
    private _totalCreated;
    constructor(transport: ITransportAdapter, options?: IMailboxFactoryOptions);
    /**
     * Create a new mailbox with the given address.
     *
     * Address convention: {mount}.$inbox
     * Example: "counter-1.$inbox"
     *
     * @param address - Unique mailbox address
     * @param options - Mailbox options (override factory defaults)
     * @returns New mailbox (not yet claimed)
     * @throws Error if address already exists
     */
    create(address: string, options?: IMailboxOptions): IMailbox;
    /**
     * Get an existing mailbox by address.
     * Returns undefined if not found.
     */
    get(address: string): IMailbox | undefined;
    /**
     * Check if a mailbox exists at the given address.
     */
    has(address: string): boolean;
    /**
     * Remove and close a mailbox.
     * Safe to call if mailbox doesn't exist.
     */
    remove(address: string): void;
    /**
     * Close all mailboxes and clear the factory.
     * Called during runtime shutdown.
     */
    closeAll(): void;
    /**
     * Get count of active mailboxes.
     */
    get count(): number;
    /**
     * List all mailbox addresses (for debugging/introspection).
     */
    listAddresses(): string[];
    /**
     * Get mailbox statistics (detailed).
     */
    getStats(): {
        count: number;
        claimed: number;
        closed: number;
        totalDepth: number;
    };
    /**
     * Get simplified stats (for common use).
     */
    stats(): {
        active: number;
        totalCreated: number;
    };
}
//# sourceMappingURL=MailboxFactory.d.ts.map