import { z } from 'zod';
export declare const zTestId: z.core.$ZodBranded<z.ZodString, "TestId", "out">;
export type TestId = z.infer<typeof zTestId>;
/**
 * The `TestIdCollector` class is responsible for generating and managing unique HTML element Ids
 * in a structured and consistent manner. Each instance of `TestIdCollector` tracks its own set of
 * Ids, ensuring that Ids are unique within the instance. This is particularly useful in scenarios
 * like test automation, where uniquely identifiable HTML elements are required.
 *
 * The class allows you to:
 * - Generate a unique Id for an HTML element and store it.
 * - Ensure no duplicate Ids are generated within the instance.
 * - Retrieve and reset all generated Ids when needed.
 *
 * Previously, the class used a static Set to track Ids across all instances, which caused issues in testing
 * environments when the same Ids were provided multiple times, throwing errors before the Ids could be flushed.
 * Since the Ids were stored globally across all tests, they persisted between test runs, leading to failures in subsequent tests.
 *
 * By switching to instance-specific Id tracking, each test maintains its own independent Set of Ids,
 * ensuring that Ids are scoped to individual test instances.
 * This avoids problems that would arise if Ids persisted globally across multiple tests.
 *
 */
export declare class TestIdCollector {
    private readonly _prefix;
    /**
     * A Set that stores all the generated Ids for the current instance of `TestIdCollector`.
     * Each instance has its own independent Set, meaning Ids are not shared between instances.
     * The Ids are stored as strings, branded with `TestId` for type safety.
     */
    private readonly _ids;
    constructor(_prefix?: string);
    /**
     * Generates a new Id for an element and stores it in the current instance's Set to ensure uniqueness.
     * If an Id with the same value already exists within the instance, an error is thrown.
     */
    add(
    /**
     * The name of the element, e.g. `age`, `submit`.
     */
    elementName: string): TestId;
    /**
     * Retrieves all the Ids that have been generated by the current instance of `TestIdCollector`.
     * After calling this method, the Set of stored Ids is cleared, resetting the collector for future use.
     * This operation only affects the current instance's Ids and has no impact on other instances.
     * */
    flush(): TestId[];
}
