import { type MaybePromise, type PartialWithUndefined } from '@augment-vir/common';
import { type AnyDuration } from '@date-vir/duration';
import { type DeclarativeElementDefinition, type DefinedTypedEvent, type TypedEvent } from 'element-vir';
import { type EmptyObject, type IsAny } from 'type-fest';
import { type UniversalTestContext } from '../augments/universal-testing-suite/universal-test-context.js';
/**
 * Expectations for `testWeb.elementCases`.
 *
 * @category Test : Util
 * @category Package : @augment-vir/test
 * @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
 */
export type ElementTestCaseExpect = {
    text: string | string[];
    events: Map<TypedEvent | DefinedTypedEvent<any, any>, unknown[]>;
};
/**
 * Individual test case for `testWeb.elementCases`.
 *
 * @category Test : Util
 * @category Package : @augment-vir/test
 * @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
 */
export type ElementTestCase<Definition extends Readonly<DeclarativeElementDefinition>> = {
    it: string;
} & (IsAny<Definition> extends true ? {
    createInputs?: ((testContext: Readonly<UniversalTestContext>) => MaybePromise<any>) | undefined;
} : Definition['InputsType'] extends EmptyObject ? {
    createInputs?: never;
} : {
    createInputs: (testContext: Readonly<UniversalTestContext>) => MaybePromise<Definition['InputsType']>;
}) & PartialWithUndefined<{
    expect: PartialWithUndefined<ElementTestCaseExpect>;
    act: (instance: Definition['InstanceType']) => MaybePromise<void>;
    only: boolean;
    skip: boolean;
}>;
/**
 * Options for `testWeb.elementCases`.
 *
 * @category Test : Util
 * @category Package : @augment-vir/test
 * @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
 */
export type ElementCasesOptions = {
    /**
     * The timeout for checking an element case's expectations.
     *
     * @default {seconds: 10}
     */
    timeout: AnyDuration;
};
export declare function elementCases<const Definition extends Readonly<DeclarativeElementDefinition>>(elementDefinition: Readonly<Definition>, testCases: ReadonlyArray<Readonly<ElementTestCase<Definition>>>, options?: Readonly<PartialWithUndefined<ElementCasesOptions>>): void;
