import { BrowserContext } from 'playwright-core';
import { DelayMode } from 'msw';
import { Expect } from 'playwright/test';
import { ExpectMatcherState } from 'playwright/test';
import { Locator } from '@playwright/test';
import { Locator as Locator_2 } from 'playwright-core';
import { Page } from 'playwright-core';
import { Page as Page_2 } from '@playwright/test';
import { PlaywrightTestArgs } from 'playwright/test';
import { PlaywrightTestOptions } from 'playwright/test';
import { PlaywrightWorkerArgs } from 'playwright/test';
import { PlaywrightWorkerOptions } from 'playwright/test';
import { Request as Request_2 } from 'playwright-core';
import { Response as Response_2 } from 'playwright-core';
import { TestType } from 'playwright/test';

declare class AccordionDriver extends ComponentDriver {
}

declare type ApiInterceptorDefinition = {
    type?: string;
    config?: Record<string, any>;
    artificialDelay?: number | DelayMode;
    schemaDescriptor?: SchemaDescriptor;
    apiUrl?: string;
    initialData?: Record<string, any[]> | (() => Promise<Record<string, any[]>>);
    helpers?: Record<string, any>;
    initialize?: string;
    operations?: Record<string, InterceptorOperationDef>;
    auth?: AuthDefinition;
    useWorker?: boolean;
};

declare class AppFooterDriver extends ComponentDriver {
}

declare class AppHeaderDriver extends ComponentDriver {
}

declare type ARRAY_DESTRUCTURE = typeof T_ARRAY_DESTRUCTURE;

declare type ARRAY_LITERAL = typeof T_ARRAY_LITERAL;

declare interface ArrayDestructure extends DestructureBase {
    type: ARRAY_DESTRUCTURE;
}

declare interface ArrayLiteral extends ExpressionBase {
    type: ARRAY_LITERAL;
    items: Expression[];
    loose?: boolean;
}

declare type ARROW_EXPRESSION = typeof T_ARROW_EXPRESSION;

declare type ARROW_EXPRESSION_STATEMENT = typeof T_ARROW_EXPRESSION_STATEMENT;

declare interface ArrowExpression extends ExpressionBase {
    type: ARROW_EXPRESSION;
    name?: string;
    args: Expression[];
    statement: Statement;
    async?: boolean;
}

declare interface ArrowExpressionStatement extends ScripNodeBase {
    type: ARROW_EXPRESSION_STATEMENT;
    expr: ArrowExpression;
}

declare type ASSIGNMENT_EXPRESSION = typeof T_ASSIGNMENT_EXPRESSION;

declare interface AssignmentExpression extends ExpressionBase {
    type: ASSIGNMENT_EXPRESSION;
    leftValue: Expression;
    op: AssignmentSymbols;
    expr: Expression;
}

declare type AssignmentSymbols = "=" | "+=" | "-=" | "**=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" | "&&=" | "||=" | "??=";

declare type ASYNC_FUNCTION_DECLARATION = typeof T_ASYNC_FUNCTION_DECLARATION;

declare type AuthDefinition = {
    defaultLoggedInUser?: any;
};

declare class AutoCompleteDriver extends ComponentDriver {
    toggleOptionsVisibility(): Promise<void>;
    selectLabel(value: string): Promise<void>;
    searchFor(value: string): Promise<void>;
    chooseIndex(index: number): Promise<void>;
}

declare class AvatarDriver extends ComponentDriver {
}

declare type AWAIT_EXPRESSION = typeof T_AWAIT_EXPRESSION;

declare interface AwaitExpression extends ExpressionBase {
    type: AWAIT_EXPRESSION;
    expr: Expression;
}

declare class BadgeDriver extends ComponentDriver {
}

declare type BINARY_EXPRESSION = typeof T_BINARY_EXPRESSION;

declare interface BinaryExpression extends ExpressionBase {
    type: BINARY_EXPRESSION;
    op: BinaryOpSymbols;
    left: Expression;
    right: Expression;
}

declare type BinaryOpSymbols = "**" | "*" | "/" | "%" | "+" | "-" | "<<" | ">>" | ">>>" | "<" | "<=" | ">" | ">=" | "==" | "===" | "!=" | "!==" | "&" | "|" | "^" | "&&" | "||" | "??" | "in" | "instanceof";

declare type BLOCK_STATEMENT = typeof T_BLOCK_STATEMENT;

declare interface BlockStatement extends ScripNodeBase {
    type: BLOCK_STATEMENT;
    stmts: Statement[];
}

declare type BREAK_STATEMENT = typeof T_BREAK_STATEMENT;

declare interface BreakStatement extends ScripNodeBase {
    type: BREAK_STATEMENT;
}

declare class ButtonDriver extends ComponentDriver {
    getFirstNonTextNode(): Locator;
    getIcons(): Locator;
}

declare type CALCULATED_MEMBER_ACCESS_EXPRESSION = typeof T_CALCULATED_MEMBER_ACCESS_EXPRESSION;

declare interface CalculatedMemberAccessExpression extends ExpressionBase {
    type: CALCULATED_MEMBER_ACCESS_EXPRESSION;
    obj: Expression;
    member: Expression;
}

declare class CardDriver extends ComponentDriver {
    get avatar(): Locator;
}

declare class CheckboxDriver extends InputComponentDriver {
    getIndicatorColor(): Promise<string>;
}

declare type ClickOption = {
    button?: "left" | "right" | "middle";
    clickCount?: number;
    delay?: number;
    force?: boolean;
    modifiers?: Array<"Alt" | "Control" | "ControlOrMeta" | "Meta" | "Shift">;
    noWaitAfter?: boolean;
    position?: {
        x: number;
        y: number;
    };
    timeout?: number;
    trial?: boolean;
};

declare class Clipboard_2 {
    private page;
    private content;
    constructor(page: Page);
    init(): () => void;
    /**
     * Reads the text from the clipboard.
     *
     * @returns The text from the clipboard.
     */
    read(): Promise<string>;
    /**
     * Writes the text to the clipboard.
     *
     * @param text - The text to write to the clipboard.
     */
    write(text: string): Promise<void>;
    clear(): Promise<void>;
    /**
     * Copies the text from the given locator to the clipboard.
     *
     * Steps:
     * 1. Focus the locator.
     * 2. Select the text.
     * 3. Copy the text to the clipboard. (ControlOrMeta+C)
     *
     * @param locator - a Locator to focus and copy from
     */
    copy(locator: Locator_2): Promise<void>;
    /**
     * Pastes the text from the clipboard to the given locator.
     *
     * Steps:
     * 1. Focus the locator.
     * 2. Paste the text from the clipboard. (ControlOrMeta+V)
     *
     * @param locator - a Locator to focus and paste to
     */
    paste(locator: Locator_2): Promise<void>;
}

declare class CodeBlockDriver extends ComponentDriver {
    getHeader(): Locator;
    getContent(): Locator;
    getCopyButton(): Locator;
    getFilename(): Locator;
    isCopyButtonVisible(): Promise<boolean>;
    hasHeader(): Promise<boolean>;
    getCodeText(): Promise<string>;
    clickCopyButton(): Promise<void>;
    hoverContent(): Promise<void>;
}

declare type CodeDeclaration = {
    source?: string;
    tree: Expression;
    [x: string]: unknown;
};

declare type CollectedDeclarations = {
    vars: Record<string, CodeDeclaration>;
    functions: Record<string, CodeDeclaration>;
    moduleErrors?: ModuleErrors;
    hasInvalidStatements?: boolean;
};

declare type ComponentApiMetadata = {
    readonly description: string;
    readonly signature?: string;
    readonly parameters?: Record<string, string>;
};

declare interface ComponentDef<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentDefCore, Scriptable {
    props?: Record<keyof TMd["props"], any>;
    events?: Record<keyof TMd["events"], any>;
    api?: Record<keyof TMd["apis"], any>;
    contextVars?: Record<keyof TMd["contextVars"], string>;
}

/**
 * This interface represents the core properties of a component definition
 * (independent of component metadata).
 */
declare interface ComponentDefCore {
    /**
     * The type discriminator field of the component; it defines the unique ID of the component type.
     */
    type: string;
    /**
     * Unique identifier of a component-like object
     */
    uid?: string;
    /**
     * An optional identifier we use for e2e tests; it does not influence the rendering of a component.
     */
    testId?: string;
    /**
     * Though components manage their state internally, the app logic may require user
     * state management. Components may have user *variables*, which the UI logic uses to
     * manage the application state. This property holds the variables (name and value
     * pairs) associated with this component definition.
     */
    vars?: Record<string, any>;
    /**
     * Global variables that flow down to all child containers regardless of the `uses`
     * property. These variables are shared across the entire application and updates
     * to them propagate back to the root container where they are defined.
     * Only the root container should define globalVars.
     */
    globalVars?: Record<string, any>;
    /**
     * Each component may have child components to constitute a hierarchy of components.
     * This property holds the definition of these nested children.
     */
    children?: ComponentDef[];
    /**
     * Components may have slots that can be filled with other components. This property
     * holds the contents of the slots.
     */
    slots?: Record<string, ComponentDef[]>;
    /**
     * This property is evaluated to a Boolean value during run time. When this value is
     * `true`, the component with its children chain is rendered; otherwise, the entire
     * component hierarchy is omitted from the rendered tree.
     */
    when?: string | boolean;
    /**
     * Per-breakpoint visibility conditions (Tailwind mobile-first style).
     * Keys are breakpoint names ("xs" | "sm" | "md" | "lg" | "xl" | "xxl").
     * When any responsiveWhen entries are defined, they become the exclusive source of truth
     * for visiblity, overriding the base `when` value. For a given screen size, the resolution
     * walks from the current breakpoint down to "xs", returning the first defined responsive
     * value. If no responsive rule matches, the component is hidden (false). If no responsiveWhen
     * entries are defined at all, the base `when` property is used (backward compatibility).
     * Example: `<Button when-md="true" />` shows only at md and above, hidden at xs/sm.
     */
    responsiveWhen?: Partial<Record<MediaBreakpointType, string | boolean>>;
    /**
     * Some components work with data obtained asynchronously. Fetching this data requires
     * some state management handling the complexity (including error handling) of data
     * access. A *loader* is responsible for managing this logic. This property holds the
     * loaders associated with this component definition.
     */
    loaders?: ComponentDef[];
    /**
     * Components may have functions that are used to perform some logic. This property
     * holds the functions (name and function body) associated with this component
     * definition.
     */
    functions?: Record<string, any>;
    /**
     * Components managing state through variables or loaders are wrapped with containers
     * responsible for this job. Just as components, containers form a hierarchy. While
     * working with this hierarchy, parent components may flow state values (key and value
     * pairs) to their child containers. This property holds the name of state values to
     * flow down to the direct child containers.
     */
    uses?: string[];
    /**
     * Arbitrary debug information that can be attached to a component definition.
     * Current usage:
     * - `debug: { source: { start: number, end: number } }` The start and end
     *   positions of the source belonging to the particular component definition.
     */
    debug?: Record<string, any>;
}

declare class ComponentDriver {
    protected readonly locator: Locator;
    protected readonly page: Page_2;
    constructor({ locator, page }: ComponentDriverParams);
    get component(): Locator;
    getByTestId(testId: string): Locator;
    getByPartName(part: string): Locator;
    getIcons(): Locator;
    getIconsByName(name: string): Locator;
    getIconByName(name: string): Locator;
    /**
     * Gets the html tag name of the final rendered component
     */
    getComponentTagName(): Promise<string>;
    click: (options?: ClickOption) => Promise<void>;
    dblclick: (options?: {
        timeout?: number;
    }) => Promise<void>;
    focus: (options?: {
        timeout?: number;
    }) => Promise<void>;
    blur: (options?: {
        timeout?: number;
    }) => Promise<void>;
    hover: (options?: {
        timeout?: number;
    }) => Promise<void>;
}

declare type ComponentDriverMethod<T extends ComponentDriver> = (testIdOrLocator?: string | Locator_2) => Promise<T>;

declare type ComponentDriverParams = {
    locator: Locator;
    page: Page_2;
};

declare type ComponentEventMetadata = {
    readonly description: string;
    readonly signature?: string;
    readonly parameters?: Record<string, string>;
};

declare type ComponentLike = ComponentDef | CompoundComponentDef;

declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentEventMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
    status?: "stable" | "experimental" | "deprecated" | "in progress" | "internal";
    description?: string;
    shortDescription?: string;
    props?: TProps;
    events?: TEvents;
    contextVars?: TContextValues;
    apis?: TApis;
    nonVisual?: boolean;
    childrenAsTemplate?: string;
    opaque?: boolean;
    themeVars?: Record<string, string>;
    themeVarDescriptions?: Record<string, string>;
    defaultThemeVars?: DefaultThemeVars;
    toneSpecificThemeVars?: Record<string, Record<string, string>>;
    limitThemeVarsToComponent?: boolean;
    themeVarContributorComponents?: string[];
    allowArbitraryProps?: boolean;
    specializedFrom?: string;
    docFolder?: string;
    isHtmlTag?: boolean;
    parts?: Record<string, ComponentPartMetadata>;
    defaultPart?: string;
    excludeBehaviors?: string[];
    compactInlineLabel?: boolean;
    deprecationMessage?: string;
    defaultAriaLabel?: string;
    /**
     * Accessibility metadata for the component.
     *
     * Used by the a11y linter (`components-core/accessibility/linter.ts`) to determine:
     *   - What ARIA role the component maps to (`role`).
     *   - Which props provide an accessible name (`accessibleNameProps`).
     *   - Whether an accessible name is required (`requiresAccessibleName`).
     *   - Which landmark region the component represents (`landmark`).
     *
     * This field is purely advisory — no runtime behaviour changes.
     */
    a11y?: {
        /**
         * The ARIA role this component maps to.
         * Interactive roles (`button`, `link`, `switch`, `checkbox`, `menuitem`,
         * `tab`, `option`) require an accessible name by default.
         * Structural roles (`landmark`, `heading`, `list`, `image`) may or may
         * not require one. `decorative` suppresses the accessible-name requirement.
         */
        readonly role?: "button" | "link" | "switch" | "checkbox" | "menuitem" | "tab" | "option" | "dialog" | "form-input" | "landmark" | "heading" | "list" | "image" | "decorative";
        /**
         * Prop names that provide an accessible name for this component.
         * The linter checks that at least one is present and non-empty.
         * Typical values: `["label", "aria-label", "title"]`.
         */
        readonly accessibleNameProps?: readonly string[];
        /**
         * When `true` (default for interactive roles), the linter emits
         * `missing-accessible-name` if none of `accessibleNameProps` is set.
         * Set to `false` for components where an accessible name is optional.
         */
        readonly requiresAccessibleName?: boolean;
        /**
         * The HTML landmark region this component represents.
         * Used to detect `duplicate-landmark` (e.g., two `<main>` on the same page).
         */
        readonly landmark?: "main" | "navigation" | "banner" | "contentinfo" | "complementary" | "search";
    };
};

declare type ComponentPartMetadata = {
    description: string;
};

declare type ComponentPropertyMetadata = {
    readonly description: string;
    readonly valueType?: PropertyValueType;
    readonly isResourceUrl?: boolean;
    readonly availableValues?: readonly PropertyValueDescription[];
    defaultValue?: any;
    isValid?: IsValidFunction<any>;
    isInternal?: boolean;
    isRequired?: boolean;
    deprecationMessage?: string;
    /**
     * Audit / PII classification metadata for this property.
     *
     * The audit pipeline (plan #15 Phase 2) uses this to apply default redaction
     * rules before forwarding log entries to sinks.  When a property is marked
     * `sensitive` or `secret`, the runtime will redact its value unless an
     * explicit policy overrides the default.
     *
     * - `"public"` — no redaction required.
     * - `"sensitive"` — mild PII (email, name, …); hashed by default.
     * - `"secret"` — high-sensitivity value (password, token, …); masked by default.
     */
    audit?: {
        classification: "public" | "sensitive" | "secret";
        defaultRedaction?: "mask" | "drop" | "hash";
    };
};

declare interface CompoundComponentDef extends Scriptable {
    name: string;
    component: ComponentDef;
    api?: Record<string, any>;
    vars?: Record<string, any>;
    namespaces?: Record<string, string>;
    debug?: Record<string, any>;
    codeBehind?: string;
}

declare type CONDITIONAL_EXPRESSION = typeof T_CONDITIONAL_EXPRESSION;

declare interface ConditionalExpression extends ExpressionBase {
    type: CONDITIONAL_EXPRESSION;
    cond: Expression;
    thenE: Expression;
    elseE: Expression;
}

declare type CONST_STATEMENT = typeof T_CONST_STATEMENT;

declare interface ConstStatement extends ScripNodeBase {
    type: CONST_STATEMENT;
    decls: VarDeclaration[];
}

declare class ContentSeparatorDriver extends ComponentDriver {
    get separator(): Locator;
    getOrientation(): Promise<"horizontal" | "vertical" | "unknown">;
    getComputedHeight(): Promise<string>;
    getComputedWidth(): Promise<string>;
    getBackgroundColor(): Promise<string>;
}

declare class ContextMenuDriver extends ComponentDriver {
    /**
     * Get all menu items
     */
    getMenuItems(): Locator;
    /**
     * Get a specific menu item by text
     */
    getMenuItem(text: string): Locator;
    /**
     * Click a menu item by text
     */
    clickMenuItem(text: string): Promise<void>;
    /**
     * Open a submenu by hovering over it
     */
    openSubMenu(submenuText: string): Promise<void>;
    /**
     * Get menu separators
     */
    getMenuSeparators(): Locator;
    /**
     * Get the menu content container
     */
    getMenuContent(): Locator;
    /**
     * Check if the menu is open
     */
    isOpen(): Promise<boolean>;
    /**
     * Wait for menu to open
     */
    waitForOpen(): Promise<void>;
    /**
     * Wait for menu to close
     */
    waitForClose(): Promise<void>;
    /**
     * Close the context menu by clicking outside
     */
    close(): Promise<void>;
}

declare type CONTINUE_STATEMENT = typeof T_CONTINUE_STATEMENT;

declare interface ContinueStatement extends ScripNodeBase {
    type: CONTINUE_STATEMENT;
}

declare class DateInputDriver extends InputComponentDriver {
    get dayInput(): Locator_2;
    get monthInput(): Locator_2;
    get yearInput(): Locator_2;
    get clearButton(): Locator_2;
}

declare class DatePickerDriver extends ComponentDriver {
    toggleDropdownVisibility(): Promise<void>;
    pickADay(value: string): Promise<void>;
}

declare type DefaultThemeVars = Record<string | ThemeTone, string | Record<string, string>>;

declare type DESTRUCTURE = typeof T_DESTRUCTURE;

declare interface Destructure extends DestructureBase {
    type: DESTRUCTURE;
    aDestr?: ArrayDestructure[];
    oDestr?: ObjectDestructure[];
}

declare interface DestructureBase extends ExpressionBase {
    id?: string;
    aDestr?: ArrayDestructure[];
    oDestr?: ObjectDestructure[];
}

declare type DO_WHILE_STATEMENT = typeof T_DO_WHILE_STATEMENT;

declare interface DoWhileStatement extends ScripNodeBase {
    type: DO_WHILE_STATEMENT;
    cond: Expression;
    body: Statement;
}

declare class DropdownMenuDriver extends ComponentDriver {
    /**
     * Get the trigger button element
     * For DropdownMenu, we'll look for the button on the page level since Radix UI may render it separately
     */
    getTrigger(): Locator;
    /**
     * Open the dropdown menu
     */
    open(): Promise<void>;
    /**
     * Close the dropdown menu by clicking outside
     */
    close(): Promise<void>;
    /**
     * Get all menu items
     */
    getMenuItems(): Locator;
    /**
     * Get a specific menu item by text
     */
    getMenuItem(text: string): Locator;
    /**
     * Click a menu item by text
     */
    clickMenuItem(text: string): Promise<void>;
    /**
     * Get submenu items
     */
    getSubMenuItems(parentText: string): Locator;
    /**
     * Open a submenu by hovering over it
     */
    openSubMenu(submenuText: string): Promise<void>;
    /**
     * Get menu separators
     */
    getMenuSeparators(): Locator;
    /**
     * Get the menu content container
     */
    getMenuContent(): Locator;
    /**
     * Check if the menu is open
     */
    isOpen(): Promise<boolean>;
    /**
     * Wait for menu to open
     */
    waitForOpen(): Promise<void>;
    /**
     * Wait for menu to close
     */
    waitForClose(): Promise<void>;
}

declare type EMPTY_STATEMENT = typeof T_EMPTY_STATEMENT;

declare interface EmptyStatement extends ScripNodeBase {
    type: EMPTY_STATEMENT;
}

declare class ExpandableItemDriver extends ComponentDriver {
    getSummary(): Locator;
    getSummaryContent(): Locator;
    getContent(): Locator;
    getIcon(): Locator;
    getSwitch(): Locator;
    isExpanded(): Promise<boolean>;
    isDisabled(): Promise<any>;
    expand(): Promise<void>;
    collapse(): Promise<void>;
    toggle(): Promise<void>;
}

export declare const expect: Expect<    {
/**
* Asserts whether the Button component has the expected label either through the `label` property
* or as a text node child.
*
* **Usage**
*
* ```js
* await initTestBed(`<Button label="hello" />`);
* const driver = await createButtonDriver();
* await expect(driver.component).toHaveLabel("hello"); // <- resolves to true
* ```
*
* @param expected Expected string label
*/
toHaveExplicitLabel(this: ExpectMatcherState, locator: Locator_2, expected: string): Promise<{
message: () => string;
pass: boolean;
name: string;
expected: string;
actual: any;
}>;
/**
* Compares two numbers with an optional tolerance value. If the tolerance is set to 0 the comparator acts as `toEqual`.
* Used to compare element dimensions on different platforms because of half pixel rendering.
*
* **Usage**
*
* ```js
* const value = 8;
* expect(value).toEqualWithTolerance(10, 2); // true
* ```
*
* @param expected Expected value
* @param tolerance Tolerance value, **default is 1**
*/
toEqualWithTolerance(this: ExpectMatcherState, provided: number, expected: number, tolerance?: number): {
message: () => string;
pass: boolean;
name: string;
expected: number;
actual: any;
};
}>;

declare type Expression = UnaryExpression | BinaryExpression | SequenceExpression | ConditionalExpression | FunctionInvocationExpression | MemberAccessExpression | CalculatedMemberAccessExpression | Identifier | TemplateLiteralExpression | Literal | ArrayLiteral | ObjectLiteral | SpreadExpression | AssignmentExpression | NoArgExpression | ArrowExpression | PrefixOpExpression | PostfixOpExpression | ReactiveVarDeclaration | AwaitExpression | NewExpression | VarDeclaration | Destructure | ObjectDestructure | ArrayDestructure | SwitchCase;

declare type EXPRESSION_STATEMENT = typeof T_EXPRESSION_STATEMENT;

declare interface ExpressionBase extends ScripNodeBase {
    parenthesized?: number;
    source?: string;
}

declare interface ExpressionStatement extends ScripNodeBase {
    type: EXPRESSION_STATEMENT;
    expr: Expression;
}

declare class FileInputDriver extends ComponentDriver {
    getTextBox(): Locator;
    getHiddenInput(): Locator;
    getBrowseButton(): Locator;
    getContainer(): Locator;
    isEnabled(): Promise<boolean>;
    getSelectedFiles(): Promise<string>;
    openFileDialog(): Promise<void>;
    getPlaceholder(): Promise<string>;
    focusButton(): Promise<void>;
    hasReadOnlyAttribute(): Promise<boolean>;
    getAcceptedFileTypes(): Promise<string>;
    isMultiple(): Promise<boolean>;
    isDirectory(): Promise<boolean>;
}

declare class FileUploadDropZoneDriver extends ComponentDriver {
    getWrapper(): Locator;
    getHiddenInput(): Locator;
    getDropPlaceholder(): Locator;
    getDropIcon(): Locator;
    isDropPlaceholderVisible(): Promise<boolean>;
    isEnabled(): Promise<boolean>;
    getDropText(): Promise<string>;
    triggerDragEnter(): Promise<void>;
    triggerDragLeave(): Promise<void>;
    triggerDrop(files?: string[]): Promise<void>;
    triggerPaste(): Promise<void>;
    hasChildren(): Promise<boolean>;
}

declare type FontDef = {
    fontFamily: string;
    fontStyle?: string;
    fontWeight?: string;
    fontDisplay?: string;
    format?: string;
    src: string;
} | string;

declare type FOR_IN_STATEMENT = typeof T_FOR_IN_STATEMENT;

declare type FOR_OF_STATEMENT = typeof T_FOR_OF_STATEMENT;

declare type FOR_STATEMENT = typeof T_FOR_STATEMENT;

declare interface ForInStatement extends ScripNodeBase {
    type: FOR_IN_STATEMENT;
    varB: ForVarBinding;
    id: Identifier;
    expr: Expression;
    body: Statement;
}

declare class FormDriver extends ComponentDriver {
    mockExternalApi(url: string, apiOptions: MockExternalApiOptions): Promise<void>;
    get submitButton(): Locator;
    get cancelButton(): Locator;
    hasSubmitButton(): Promise<boolean>;
    submitForm(trigger?: SubmitTrigger): Promise<void>;
    getSubmitRequest(endpoint?: string, requestMethod?: string, trigger?: SubmitTrigger, timeout?: number): Promise<Request_2>;
    waitForSubmitResponse(endpoint?: string, responseStatus?: number, timeout?: number): Promise<Response_2>;
    /**
     * Gets the validation summary component inside the Form.
     * Uses the 'data-validation-summary' attribute to find the component
     */
    getValidationSummary(): Locator;
    /**
     * Gets the validation display components inside the Form.
     * Uses the 'data-validation-display-severity' attribute to find the components.
     * The attribute contains the severity of the validation.
     */
    getValidationDisplays(): Locator;
    getValidationDisplaysBySeverity(severity: string): Locator;
}

declare class FormItemDriver extends ComponentDriver {
    get input(): Locator;
    get textBox(): Locator;
    get checkbox(): Locator;
    get label(): Locator;
    get validationStatusTag(): string;
    get validationStatusIndicator(): Locator;
}

declare interface ForOfStatement extends ScripNodeBase {
    type: FOR_OF_STATEMENT;
    varB: ForVarBinding;
    id: Identifier;
    expr: Expression;
    body: Statement;
}

declare interface ForStatement extends ScripNodeBase {
    type: FOR_STATEMENT;
    init?: ExpressionStatement | LetStatement;
    cond?: Expression;
    upd?: Expression;
    body: Statement;
}

declare type ForVarBinding = "let" | "const" | "none";

declare type FUNCTION_DECLARATION = typeof T_FUNCTION_DECLARATION;

declare type FUNCTION_INVOCATION_EXPRESSION = typeof T_FUNCTION_INVOCATION_EXPRESSION;

declare interface FunctionDeclaration extends ScripNodeBase {
    type: FUNCTION_DECLARATION | ASYNC_FUNCTION_DECLARATION;
    id: Identifier;
    args: Expression[];
    stmt: BlockStatement;
    async?: boolean;
}

declare interface FunctionInvocationExpression extends ExpressionBase {
    type: FUNCTION_INVOCATION_EXPRESSION;
    obj: Expression;
    arguments: Expression[];
}

declare type GenericToken<T> = {
    text: string;
    type: T;
    startPosition: number;
    endPosition: number;
    startLine: number;
    endLine: number;
    startColumn: number;
    endColumn: number;
};

declare class HeadingDriver extends ComponentDriver {
}

declare class HStackDriver extends StackDriver {
}

declare class HtmlTagDriver extends ComponentDriver {
}

declare class IconDriver extends ComponentDriver {
    get svgIcon(): Locator;
}

declare type IDENTIFIER = typeof T_IDENTIFIER;

declare interface Identifier extends ExpressionBase {
    type: IDENTIFIER;
    name: string;
}

declare type IF_STATEMENT = typeof T_IF_STATEMENT;

declare interface IfStatement extends ScripNodeBase {
    type: IF_STATEMENT;
    cond: Expression;
    thenB: Statement;
    elseB?: Statement;
}

declare type IMPORT_DECLARATION = typeof T_IMPORT_DECLARATION;

declare type IMPORT_SPECIFIER = typeof T_IMPORT_SPECIFIER;

declare interface ImportDeclaration extends ScripNodeBase {
    type: IMPORT_DECLARATION;
    specifiers: ImportSpecifier[];
    source: Literal;
}

declare interface ImportSpecifier extends ExpressionBase {
    type: IMPORT_SPECIFIER;
    imported: Identifier;
    local?: Identifier;
}

declare class InputComponentDriver extends ComponentDriver {
    get field(): Locator;
    get label(): Locator;
    get placeholder(): Promise<string>;
    get requiredIndicator(): Locator;
}

declare type InterceptorOperationDef = {
    method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options";
    url: string | Array<string>;
    handler: string;
    requestShape?: any;
    responseShape?: any;
    pathParamTypes?: Record<string, string>;
    queryParamTypes?: Record<string, string>;
    successStatusCode?: number;
};

declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;

declare class ItemsDriver extends ComponentDriver {
}

declare class LabelDriver extends ComponentDriver {
}

declare type LET_STATEMENT = typeof T_LET_STATEMENT;

declare interface LetStatement extends ScripNodeBase {
    type: LET_STATEMENT;
    decls: VarDeclaration[];
}

declare class LinkDriver extends ComponentDriver {
}

declare class ListDriver extends ComponentDriver {
    /**
     * Gets all list item elements
     */
    get items(): Locator;
    /**
     * Gets the loading spinner element
     */
    get loadingSpinner(): Locator;
    /**
     * Checks if the loading state is visible
     */
    isLoading(): Promise<boolean>;
    /**
     * Gets group header elements
     */
    get groupHeaders(): Locator;
    /**
     * Gets group footer elements
     */
    get groupFooters(): Locator;
    /**
     * Gets the empty state element
     */
    get emptyState(): Locator;
    /**
     * Scrolls the list to a specific position
     */
    scrollTo(position: "top" | "bottom" | number): Promise<void>;
    /**
     * Gets the number of visible items (for virtualization testing)
     */
    getVisibleItemCount(): Promise<number>;
    /**
     * Gets item at specific index
     */
    getItemAt(index: number): Locator;
    /**
     * Gets item by text content
     */
    getItemByText(text: string): Locator;
    /**
     * Checks if list is empty
     */
    isEmpty(): Promise<boolean>;
    /**
     * Gets all text content from visible items
     */
    getVisibleItemTexts(): Promise<string[]>;
}

declare type LITERAL = typeof T_LITERAL;

declare interface Literal extends ExpressionBase {
    type: LITERAL;
    value: any;
}

declare class MarkdownDriver extends ComponentDriver {
    hasHtmlElement(elements: string | string[]): Promise<boolean>;
}

declare const MediaBreakpointKeys: readonly ["xs", "sm", "md", "lg", "xl", "xxl"];

declare type MediaBreakpointType = (typeof MediaBreakpointKeys)[number];

declare type MEMBER_ACCESS_EXPRESSION = typeof T_MEMBER_ACCESS_EXPRESSION;

declare interface MemberAccessExpression extends ExpressionBase {
    type: MEMBER_ACCESS_EXPRESSION;
    obj: Expression;
    member: string;
    opt?: boolean;
}

declare type MockExternalApiOptions = {
    status?: number;
    headers?: Record<string, string>;
    body?: Record<string, any>;
};

declare class ModalDialogDriver extends ComponentDriver {
    get titlePart(): Locator_2;
}

/**
 * Represents a module error
 */
declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;

declare class NavGroupDriver extends ComponentDriver {
    getIcons(): Locator;
}

declare class NavLinkDriver extends ComponentDriver {
}

declare class NavPanelDriver extends ComponentDriver {
}

declare type NEW_EXPRESSION = typeof T_NEW_EXPRESSION;

declare interface NewExpression extends ExpressionBase {
    type: NEW_EXPRESSION;
    callee: Expression;
    arguments: Expression[];
}

declare type NO_ARG_EXPRESSION = typeof T_NO_ARG_EXPRESSION;

declare interface NoArgExpression extends ExpressionBase {
    type: NO_ARG_EXPRESSION;
}

declare class NoResultDriver extends ComponentDriver {
}

declare class NumberBoxDriver extends InputComponentDriver {
    get input(): Locator_2;
    get startAdornment(): Locator_2;
    get endAdornment(): Locator_2;
    get spinnerUp(): Locator_2;
    get spinnerDown(): Locator_2;
    increment(): Promise<void>;
    decrement(): Promise<void>;
}

declare type OBJECT_DESTRUCTURE = typeof T_OBJECT_DESTRUCTURE;

declare type OBJECT_LITERAL = typeof T_OBJECT_LITERAL;

declare interface ObjectDestructure extends DestructureBase {
    type: OBJECT_DESTRUCTURE;
    id: string;
    alias?: string;
}

declare interface ObjectLiteral extends ExpressionBase {
    type: OBJECT_LITERAL;
    props: (SpreadExpression | [Expression, Expression])[];
}

declare class OptionDriver extends ComponentDriver {
}

declare type POSTFIX_OP_EXPRESSION = typeof T_POSTFIX_OP_EXPRESSION;

declare interface PostfixOpExpression extends ExpressionBase {
    type: POSTFIX_OP_EXPRESSION;
    op: PrefixOpSymbol;
    expr: Expression;
}

declare type PREFIX_OP_EXPRESSION = typeof T_PREFIX_OP_EXPRESSION;

declare interface PrefixOpExpression extends ExpressionBase {
    type: PREFIX_OP_EXPRESSION;
    op: PrefixOpSymbol;
    expr: Expression;
}

declare type PrefixOpSymbol = "++" | "--";

declare class ProgressBarDriver extends ComponentDriver {
    get bar(): Locator;
    getProgressRatio(): Promise<number>;
}

declare type PropertyValueDescription<T = string | number> = T | {
    value: T;
    description: string;
};

declare type PropertyValueType = "boolean" | "string" | "number" | "any" | "ComponentDef";

declare class RadioGroupDriver extends ComponentDriver {
}

declare class RangeDriver extends ComponentDriver {
}

declare type REACTIVE_VAR_DECLARATION = typeof T_REACTIVE_VAR_DECLARATION;

declare interface ReactiveVarDeclaration extends ExpressionBase {
    type: REACTIVE_VAR_DECLARATION;
    id: Identifier;
    expr: Expression;
}

declare class ResponsiveBarDriver extends ComponentDriver {
    /**
     * Get all menu items
     */
    getMenuItems(): Locator;
}

declare type RETURN_STATEMENT = typeof T_RETURN_STATEMENT;

declare interface ReturnStatement extends ScripNodeBase {
    type: RETURN_STATEMENT;
    expr?: Expression;
}

declare type SchemaDescriptor = {
    tables: Array<TableDescriptor>;
    relationships?: any;
    dtos?: any;
};

declare interface ScripNodeBase {
    type: ScriptNode["type"];
    nodeId: number;
    startToken?: ScriptingToken;
    endToken?: ScriptingToken;
}

declare interface Scriptable {
    script?: string;
    scriptCollected?: CollectedDeclarations;
    scriptError?: any;
}

declare type ScriptingToken = GenericToken<TokenType>;

declare type ScriptNode = Statement | Expression;

declare interface ScriptParserErrorMessage {
    code: ScriptParsingErrorCodes;
    text: string;
    position?: number;
    line?: number;
    column?: number;
}

declare type ScriptParsingErrorCodes = "W001" | "W002" | "W003" | "W004" | "W005" | "W006" | "W007" | "W008" | "W009" | "W010" | "W011" | "W012" | "W013" | "W014" | "W015" | "W016" | "W017" | "W018" | "W019" | "W020" | "W021" | "W022" | "W023" | "W024" | "W025" | "W026" | "W027" | "W028" | "W029" | "W030" | "W031" | "W032" | "W033" | "W034" | "W035" | "W036" | "W037" | "W040" | "W038" | "W039" | "W041" | "W042" | "W043" | "W044" | "W045";

declare class SelectDriver extends ComponentDriver {
    get clearButton(): Locator;
    toggleOptionsVisibility(): Promise<void>;
    selectLabel(value: string): Promise<void>;
    selectFirstLabelPostSearh(label: string): Promise<void>;
    searchFor(value: string): Promise<void>;
    chooseIndex(index: number): Promise<void>;
    selectMultipleLabels(values: string[]): Promise<void>;
}

declare type SEQUENCE_EXPRESSION = typeof T_SEQUENCE_EXPRESSION;

declare interface SequenceExpression extends ExpressionBase {
    type: SEQUENCE_EXPRESSION;
    exprs: Expression[];
    loose?: boolean;
}

declare class SliderDriver extends ComponentDriver {
    private getActiveThumb;
    dragThumbByMouse(location: "start" | "end" | "middle", thumbNumber?: number): Promise<void>;
    stepThumbByKeyboard(key: "ArrowLeft" | "ArrowRight" | "Home" | "End", thumbNumber?: number, repeat?: number): Promise<void>;
}

declare class SpinnerDriver extends ComponentDriver {
    /**
     * Gets the main spinner element (the one with the ring animation)
     */
    get spinnerElement(): Locator;
    /**
     * Gets a specific spinner element by index (for multiple spinners)
     */
    getSpinnerByIndex(index: number): Locator;
    /**
     * Gets the fullscreen wrapper element (only exists when fullScreen=true)
     */
    get fullScreenWrapper(): Locator;
    /**
     * Checks if the spinner is in fullscreen mode
     */
    isFullScreen(): Promise<boolean>;
    /**
     * Gets the computed style of the spinner element
     */
    getSpinnerStyle(): Promise<{
        display: string;
        position: string;
        width: string;
        height: string;
        animationDuration: string;
        className: string;
    }>;
    /**
     * Gets the animation duration from the child elements (where the actual animation occurs)
     */
    getAnimationDuration(): Promise<string>;
    /**
     * Waits for the spinner to appear
     */
    waitForSpinner(timeout?: number): Promise<void>;
    /**
     * Waits for the spinner to disappear
     */
    waitForSpinnerToDisappear(timeout?: number): Promise<void>;
    /**
     * Checks if the spinner is visible
     */
    isVisible(): Promise<boolean>;
    /**
     * Gets the CSS class name to verify CSS modules are working
     */
    getClassName(): Promise<string>;
    /**
     * Gets the number of child div elements (should be 4 for the ring animation)
     */
    getChildCount(): Promise<number>;
    /**
     * Gets the total number of spinner components on the page
     */
    getSpinnerCount(): Promise<number>;
    /**
     * Gets a spinner by specific test ID
     */
    getSpinnerByTestId(testId: string): Locator;
    /**
     * Checks if fullscreen mode has the correct wrapper structure
     */
    getFullScreenWrapperInfo(): Promise<{
        position: string;
        inset: string;
        parentClassName: string;
        hasSpinnerChild: boolean;
    }>;
}

declare class SplitterDriver extends ComponentDriver {
    /**
     * Gets the resizer element (non-floating)
     */
    getResizer(): Promise<Locator>;
    /**
     * Gets the floating resizer element
     */
    getFloatingResizer(): Promise<Locator>;
    /**
     * Hovers near the resizer area to trigger floating resizer visibility
     */
    hoverNearResizer(): Promise<void>;
    /**
     * Drags the resizer by the specified offset
     * @param deltaX - Horizontal offset in pixels
     * @param deltaY - Vertical offset in pixels
     */
    dragResizer(deltaX: number, deltaY: number): Promise<void>;
    /**
     * Gets the primary panel element
     */
    getPrimaryPanel(): Locator;
    /**
     * Gets the secondary panel element
     */
    getSecondaryPanel(): Locator;
}

declare type SPREAD_EXPRESSION = typeof T_SPREAD_EXPRESSION;

declare interface SpreadExpression extends ExpressionBase {
    type: SPREAD_EXPRESSION;
    expr: Expression;
}

declare class StackDriver extends ComponentDriver {
}

declare type StandaloneAppDescription = {
    name?: string;
    version?: string;
    entryPoint?: ComponentLike;
    components?: CompoundComponentDef[];
    themes?: ThemeDefinition[];
    defaultTheme?: string;
    defaultTone?: string;
    resources?: Record<string, string>;
    resourceMap?: Record<string, string>;
    /**
     * Arbitrary key/value settings accessible as `appContext.appGlobals` throughout the framework.
     *
     * Well-known keys:
     * - `xsVerbose` (boolean) — enable Inspector trace logging.
     * - `xsVerboseLogMax` (number) — max trace buffer size (default 200).
     * - `xsVerboseLogBucket` (string) — optional bucket label for trace entries.
     * - `defaultToOptionalMemberAccess` (boolean) — treat all member accesses as optional
     *   (default `true`).
     * - `maxCompoundDepth` (number) — max recursion depth for compound components.
     * - `strictDomSandbox` (boolean, default `false`) — when `true`, any expression that
     *   accesses a banned DOM API throws a `BannedApiError` immediately. When `false`
     *   (the rollout warn phase default), the access proceeds but a `console.warn` is
     *   emitted and a `"sandbox:warn"` Inspector trace entry is pushed so teams can audit
     *   usages before flipping to `true`. See `dev-docs/plans/dom-api-hardening.md`.
     * - `silentConsole` (boolean, default `false`) — controls whether `Log.*` calls mirror
     *   to the native `console.*` in addition to the Inspector trace. When `false` (default),
     *   `Log.info("x")` writes both to the trace and to `console.info`. When `true`, only the
     *   trace entry is emitted — nothing reaches the browser console. Useful in production
     *   deployments where trace data is exported to a server sink. This flag does NOT re-enable
     *   direct `console` access from expressions; that is governed by `strictDomSandbox`.
     * - `allowConsole` (boolean, default `true`) — when `true` (the default), expressions may
     *   freely access `console.*` methods (e.g. `console.log(msg)`). Set to `false` to enforce
     *   the sandbox ban and migrate call sites to `Log.*()` functions. Unlike `strictDomSandbox`
     *   which controls throw-vs-warn for *all* banned APIs, `allowConsole` is a targeted opt-out
     *   exclusively for `console`. When `false`, a `strictDomSandbox: true` config throws
     *   `BannedApiError`; without strict mode it emits a `sandbox:warn` trace entry.
     * - `allowedOrigins` (string[], default `undefined`) — when set, `App.fetch()` rejects any
     *   request whose target origin is not in this list before reaching the network. Origins
     *   must be fully-qualified (e.g. `"https://api.example.com"`). Same-origin requests are
     *   always permitted regardless of this list.
     * - `withXSRFToken` (boolean, default `true`) — when `true`, `App.fetch()` automatically
     *   injects the `X-XSRF-TOKEN` header from the `XSRF-TOKEN` cookie for same-origin
     *   requests. Set to `false` to disable this behaviour.
     * - `appStateKeys` (string[], default `undefined`) — when set, `AppState` rejects any
     *   call whose top-level bucket name is not in the list, throwing
     *   `AppStateSchemaError`. When unset, AppState is permissive — any bucket name is
     *   accepted. Use this in production to lock the global state surface to a declared
     *   schema and prevent accidental key sprawl. See
     *   `dev-docs/plans/dom-api-hardening.md` Step 2.1.
     * - `strictBuildValidation` (boolean, default `false`) — when `true`, all build-time
     *   validation diagnostics escalate one severity step (info → warn → error) and the
     *   `xmlui check` CLI exits non-zero on any `error`-severity finding. Flips to `true`
     *   in the next major release. See `dev-docs/plans/13-build-validation-analyzers.md`.
     * - `strictErrors` (boolean, default `false`) — when `true`, throwing a plain `Error`
     *   from script logs a `kind:"errors"` warn diagnostic with a migration hint to use
     *   `AppError`. Flips to `true` in the next major release. See
     *   `dev-docs/plans/07-structured-exception-model.md`.
     * - `errorCorrelationIdHeader` (string, default `"X-Correlation-Id"`) — the HTTP
     *   response header from which `AppError.correlationId` is read when a fetch fails.
     *   See `dev-docs/plans/07-structured-exception-model.md`.
     * - `strictAuditLogging` (boolean, default `false`) — when `true`, the default
     *   redaction policy blocks on un-redacted PII fields and the sink behaviour changes
     *   from "drop on backpressure" to "bounded buffer then drop with `audit-loss`
     *   diagnostic". Flips to `true` in the next major release. See
     *   `dev-docs/plans/15-audit-grade-observability.md`.
     * - `strictAccessibility` (boolean, default `false`) — when `true`, accessibility
     *   linter findings (`icon-only-button-no-label`, `modal-no-title`,
     *   `missing-accessible-name`, `form-input-no-label`) escalate from `warn` to
     *   `error`, causing the Vite build to fail if any are present. In non-strict mode
     *   they are warnings only. See `dev-docs/plans/05-enforced-accessibility.md`.
     * - `strictReactiveGraph` (boolean, default `false`) — when `true`, every
     *   detected reactive cycle (var ↔ var, var ↔ DataSource, function-mediated)
     *   produces a `kind:"reactive-cycle"` error trace entry plus a one-shot toast
     *   (planned for W6). When `false` (the rollout warn phase default — W2-7), the
     *   detector still runs at startup and emits a single `kind:"reactive-cycle"`
     *   warn entry per unique cycle so teams can audit existing apps before the
     *   strict default flips. See `dev-docs/plans/03-reactive-cycle-detection.md`.
     */
    appGlobals?: Record<string, any>;
    apiInterceptor?: ApiInterceptorDefinition;
    sources?: Record<string, string>;
    icons?: Record<string, string>;
};

declare type Statement = BlockStatement | EmptyStatement | ExpressionStatement | ArrowExpressionStatement | LetStatement | ConstStatement | VarStatement | IfStatement | ReturnStatement | BreakStatement | ContinueStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ThrowStatement | TryStatement | SwitchStatement | FunctionDeclaration | ImportDeclaration | ImportSpecifier;

declare type SubmitTrigger = "click" | "keypress";

declare type SWITCH_CASE = typeof T_SWITCH_CASE;

declare type SWITCH_STATEMENT = typeof T_SWITCH_STATEMENT;

declare interface SwitchCase extends ExpressionBase {
    type: SWITCH_CASE;
    caseE?: Expression;
    stmts?: Statement[];
}

declare interface SwitchStatement extends ScripNodeBase {
    type: SWITCH_STATEMENT;
    expr: Expression;
    cases: SwitchCase[];
}

declare const T_ARRAY_DESTRUCTURE: number;

declare const T_ARRAY_LITERAL: number;

declare const T_ARROW_EXPRESSION: number;

declare const T_ARROW_EXPRESSION_STATEMENT: number;

declare const T_ASSIGNMENT_EXPRESSION: number;

declare const T_ASYNC_FUNCTION_DECLARATION: number;

declare const T_AWAIT_EXPRESSION: number;

declare const T_BINARY_EXPRESSION: number;

declare const T_BLOCK_STATEMENT: number;

declare const T_BREAK_STATEMENT: number;

declare const T_CALCULATED_MEMBER_ACCESS_EXPRESSION: number;

declare const T_CONDITIONAL_EXPRESSION: number;

declare const T_CONST_STATEMENT: number;

declare const T_CONTINUE_STATEMENT: number;

declare const T_DESTRUCTURE: number;

declare const T_DO_WHILE_STATEMENT: number;

declare const T_EMPTY_STATEMENT: number;

declare const T_EXPRESSION_STATEMENT: number;

declare const T_FOR_IN_STATEMENT: number;

declare const T_FOR_OF_STATEMENT: number;

declare const T_FOR_STATEMENT: number;

declare const T_FUNCTION_DECLARATION: number;

declare const T_FUNCTION_INVOCATION_EXPRESSION: number;

declare const T_IDENTIFIER: number;

declare const T_IF_STATEMENT: number;

declare const T_IMPORT_DECLARATION: number;

declare const T_IMPORT_SPECIFIER: number;

declare const T_LET_STATEMENT: number;

declare const T_LITERAL: number;

declare const T_MEMBER_ACCESS_EXPRESSION: number;

declare const T_NEW_EXPRESSION: number;

declare const T_NO_ARG_EXPRESSION: number;

declare const T_OBJECT_DESTRUCTURE: number;

declare const T_OBJECT_LITERAL: number;

declare const T_POSTFIX_OP_EXPRESSION: number;

declare const T_PREFIX_OP_EXPRESSION: number;

declare const T_REACTIVE_VAR_DECLARATION: number;

declare const T_RETURN_STATEMENT: number;

declare const T_SEQUENCE_EXPRESSION: number;

declare const T_SPREAD_EXPRESSION: number;

declare const T_SWITCH_CASE: number;

declare const T_SWITCH_STATEMENT: number;

declare const T_TEMPLATE_LITERAL_EXPRESSION: number;

declare const T_THROW_STATEMENT: number;

declare const T_TRY_STATEMENT: number;

declare const T_UNARY_EXPRESSION: number;

declare const T_VAR_DECLARATION: number;

declare const T_VAR_STATEMENT: number;

declare const T_WHILE_STATEMENT: number;

declare type TableDescriptor = {
    name: string;
    fields?: Record<string, any>;
    pk: Array<string>;
    indexes?: Array<string>;
};

declare type TEMPLATE_LITERAL_EXPRESSION = typeof T_TEMPLATE_LITERAL_EXPRESSION;

declare interface TemplateLiteralExpression extends ExpressionBase {
    type: TEMPLATE_LITERAL_EXPRESSION;
    segments: (Literal | Expression)[];
}

export declare const test: TestType<PlaywrightTestArgs & PlaywrightTestOptions & TestDriverExtenderProps, PlaywrightWorkerArgs & PlaywrightWorkerOptions & WorkerFixtures>;

declare type TestBedDescription = Omit<Partial<StandaloneAppDescription>, "entryPoint" | "components"> & {
    testThemeVars?: Record<string, string>;
    components?: string[];
    appGlobals?: Record<string, any>;
    /** Script source for Globals.xs — declarations become app-wide globals */
    globalsXs?: string;
    /** @deprecated Use globalsXs instead. Alias kept for backward compatibility. */
    mainXs?: string;
    noFragmentWrapper?: boolean;
    extensionIds?: string | string[];
};

declare type TestDriverExtenderProps = {
    testStateViewTestId: string;
    baseComponentTestId: string;
    initTestBed: (source: string, description?: TestBedDescription) => Promise<{
        testStateDriver: TestStateDriver;
        clipboard: Clipboard_2;
        width: number;
        height: number;
        testIcons: {
            boxIcon: Locator_2;
            docIcon: Locator_2;
            sunIcon: Locator_2;
            eyeIcon: Locator_2;
            txtIcon: Locator_2;
            bellIcon: Locator_2;
        };
    }>;
    createDriver: <T extends new (...args: ComponentDriverParams[]) => any>(driverClass: T, testIdOrLocator?: string | Locator_2) => Promise<InstanceType<T>>;
    createButtonDriver: ComponentDriverMethod<ButtonDriver>;
    createContentSeparatorDriver: ComponentDriverMethod<ContentSeparatorDriver>;
    createAvatarDriver: ComponentDriverMethod<AvatarDriver>;
    createFormDriver: ComponentDriverMethod<FormDriver>;
    createFormItemDriver: ComponentDriverMethod<FormItemDriver>;
    createValidationSummaryDriver: ComponentDriverMethod<ValidationSummaryDriver>;
    createValidationDisplayDriver: ComponentDriverMethod<ValidationDisplayDriver>;
    createSplitterDriver: ComponentDriverMethod<SplitterDriver>;
    createMarkdownDriver: ComponentDriverMethod<MarkdownDriver>;
    createItemsDriver: ComponentDriverMethod<ItemsDriver>;
    createSliderDriver: ComponentDriverMethod<SliderDriver>;
    createRangeDriver: ComponentDriverMethod<RangeDriver>;
    createDatePickerDriver: ComponentDriverMethod<DatePickerDriver>;
    createExpandableItemDriver: ComponentDriverMethod<ExpandableItemDriver>;
    createFileInputDriver: ComponentDriverMethod<FileInputDriver>;
    createFileUploadDropZoneDriver: ComponentDriverMethod<FileUploadDropZoneDriver>;
    createAutoCompleteDriver: ComponentDriverMethod<AutoCompleteDriver>;
    createSelectDriver: ComponentDriverMethod<SelectDriver>;
    createRadioGroupDriver: ComponentDriverMethod<RadioGroupDriver>;
    createNumberBoxDriver: ComponentDriverMethod<NumberBoxDriver>;
    createTextBoxDriver: ComponentDriverMethod<TextBoxDriver>;
    createTextAreaDriver: ComponentDriverMethod<TextAreaDriver>;
    createProgressBarDriver: ComponentDriverMethod<ProgressBarDriver>;
    createListDriver: ComponentDriverMethod<ListDriver>;
    createTextDriver: ComponentDriverMethod<TextDriver>;
    createHeadingDriver: ComponentDriverMethod<HeadingDriver>;
    createIconDriver: ComponentDriverMethod<IconDriver>;
    createStackDriver: ComponentDriverMethod<StackDriver>;
    createHStackDriver: ComponentDriverMethod<HStackDriver>;
    createVStackDriver: ComponentDriverMethod<VStackDriver>;
    createLinkDriver: ComponentDriverMethod<LinkDriver>;
    createNavLinkDriver: ComponentDriverMethod<NavLinkDriver>;
    createNavGroupDriver: ComponentDriverMethod<NavGroupDriver>;
    createNavPanelDriver: ComponentDriverMethod<NavPanelDriver>;
    createCardDriver: ComponentDriverMethod<CardDriver>;
    createAccordionDriver: ComponentDriverMethod<AccordionDriver>;
    createAppHeaderDriver: ComponentDriverMethod<AppHeaderDriver>;
    createAppFooterDriver: ComponentDriverMethod<AppFooterDriver>;
    createBadgeDriver: ComponentDriverMethod<BadgeDriver>;
    createNoResultDriver: ComponentDriverMethod<NoResultDriver>;
    createOptionDriver: ComponentDriverMethod<OptionDriver>;
    createHtmlTagDriver: ComponentDriverMethod<HtmlTagDriver>;
    createCodeBlockDriver: ComponentDriverMethod<CodeBlockDriver>;
    createCheckboxDriver: ComponentDriverMethod<CheckboxDriver>;
    createLabelDriver: ComponentDriverMethod<LabelDriver>;
    createSpinnerDriver: ComponentDriverMethod<SpinnerDriver>;
    createDropdownMenuDriver: ComponentDriverMethod<DropdownMenuDriver>;
    createContextMenuDriver: ComponentDriverMethod<ContextMenuDriver>;
    createTimeInputDriver: ComponentDriverMethod<TimeInputDriver>;
    createTimerDriver: ComponentDriverMethod<TimerDriver>;
    createDateInputDriver: ComponentDriverMethod<DateInputDriver>;
    createModalDialogDriver: ComponentDriverMethod<ModalDialogDriver>;
    createTreeDriver: ComponentDriverMethod<TreeDriver>;
    createResponsiveBarDriver: ComponentDriverMethod<ResponsiveBarDriver>;
};

declare class TestStateDriver {
    protected readonly testStateLocator: Locator;
    constructor(testStateLocator: Locator);
    /** returns an async function that can query the test state */
    get testState(): () => Promise<any>;
}

declare class TextAreaDriver extends InputComponentDriver {
}

declare class TextBoxDriver extends InputComponentDriver {
    get input(): Locator_2;
    get startAdornment(): Locator_2;
    get endAdornment(): Locator_2;
    get button(): Locator_2;
}

declare class TextDriver extends ComponentDriver {
}

declare interface ThemeDefinition extends ThemeDefinitionDetails {
    id: string;
    name?: string;
    extends?: string | Array<string>;
    tones?: Record<string | ThemeTone, ThemeDefinitionDetails>;
    color?: string;
}

declare interface ThemeDefinitionDetails {
    themeVars?: Record<string, string>;
    resources?: Record<string, string | FontDef>;
}

declare type ThemeTone = "light" | "dark";

declare type THROW_STATEMENT = typeof T_THROW_STATEMENT;

declare interface ThrowStatement extends ScripNodeBase {
    type: THROW_STATEMENT;
    expr: Expression;
}

declare class TimeInputDriver extends InputComponentDriver {
    get hourInput(): Locator_2;
    get minuteInput(): Locator_2;
    get secondInput(): Locator_2;
    get amPmInput(): Locator_2;
    get clearButton(): Locator_2;
}

declare class TimerDriver extends ComponentDriver {
    isEnabled(): Promise<boolean>;
    isRunning(): Promise<boolean>;
    isPaused(): Promise<boolean>;
    isInInitialDelay(): Promise<boolean>;
    getInterval(): Promise<number>;
    getInitialDelay(): Promise<number>;
    isOnce(): Promise<boolean>;
    hasExecuted(): Promise<boolean>;
}

declare enum TokenType {
    Eof = -1,
    Ws = -2,
    BlockComment = -3,
    EolComment = -4,
    Unknown = 0,
    LParent = 1,
    RParent = 2,
    Identifier = 3,
    Exponent = 4,
    Divide = 5,
    Multiply = 6,
    Remainder = 7,
    Plus = 8,
    Minus = 9,
    BitwiseXor = 10,
    BitwiseOr = 11,
    LogicalOr = 12,
    BitwiseAnd = 13,
    LogicalAnd = 14,
    IncOp = 15,
    DecOp = 16,
    Assignment = 17,
    AddAssignment = 18,
    SubtractAssignment = 19,
    ExponentAssignment = 20,
    MultiplyAssignment = 21,
    DivideAssignment = 22,
    RemainderAssignment = 23,
    ShiftLeftAssignment = 24,
    ShiftRightAssignment = 25,
    SignedShiftRightAssignment = 26,
    BitwiseAndAssignment = 27,
    BitwiseXorAssignment = 28,
    BitwiseOrAssignment = 29,
    LogicalAndAssignment = 30,
    LogicalOrAssignment = 31,
    NullCoalesceAssignment = 32,
    Semicolon = 33,
    Comma = 34,
    Colon = 35,
    LSquare = 36,
    RSquare = 37,
    QuestionMark = 38,
    NullCoalesce = 39,
    OptionalChaining = 40,
    BinaryNot = 41,
    LBrace = 42,
    RBrace = 43,
    Equal = 44,
    StrictEqual = 45,
    LogicalNot = 46,
    NotEqual = 47,
    StrictNotEqual = 48,
    LessThan = 49,
    LessThanOrEqual = 50,
    ShiftLeft = 51,
    GreaterThan = 52,
    GreaterThanOrEqual = 53,
    ShiftRight = 54,
    SignedShiftRight = 55,
    Dot = 56,
    Spread = 57,
    Backtick = 58,
    DollarLBrace = 59,
    Arrow = 60,
    DecimalLiteral = 61,
    HexadecimalLiteral = 62,
    BinaryLiteral = 63,
    RealLiteral = 64,
    StringLiteral = 65,
    Infinity = 66,
    NaN = 67,
    True = 68,
    False = 69,
    Typeof = 70,
    Null = 71,
    Undefined = 72,
    In = 73,
    Instanceof = 74,
    Let = 75,
    Const = 76,
    Var = 77,
    If = 78,
    Else = 79,
    Return = 80,
    Break = 81,
    Continue = 82,
    Do = 83,
    While = 84,
    For = 85,
    Of = 86,
    Try = 87,
    Catch = 88,
    Finally = 89,
    Throw = 90,
    Switch = 91,
    Case = 92,
    Default = 93,
    Delete = 94,
    Function = 95,
    New = 96,
    As = 97,
    Import = 98,
    From = 99
}

declare class TreeDriver extends ComponentDriver {
    getNodeById(nodeId: string): Locator;
    getNodeWrapperByTestId(marker: string): Locator;
}

declare type TRY_STATEMENT = typeof T_TRY_STATEMENT;

declare interface TryStatement extends ScripNodeBase {
    type: TRY_STATEMENT;
    tryB: BlockStatement;
    catchB?: BlockStatement;
    catchV?: Identifier;
    finallyB?: BlockStatement;
}

declare type UNARY_EXPRESSION = typeof T_UNARY_EXPRESSION;

declare interface UnaryExpression extends ExpressionBase {
    type: UNARY_EXPRESSION;
    op: UnaryOpSymbols;
    expr: Expression;
}

declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";

declare class ValidationDisplayDriver extends ComponentDriver {
    getSeverity(): Promise<string>;
    getText(): Promise<string>;
}

declare class ValidationSummaryDriver extends ComponentDriver {
    /**
     * Gets the validation display components inside the Form.
     * Uses the 'data-validation-display-severity' attribute to find the components.
     * The attribute contains the severity of the validation.
     */
    getValidationDisplays(): Locator;
}

declare type VAR_DECLARATION = typeof T_VAR_DECLARATION;

declare type VAR_STATEMENT = typeof T_VAR_STATEMENT;

declare interface VarDeclaration extends ExpressionBase {
    type: VAR_DECLARATION;
    id?: string;
    aDestr?: ArrayDestructure[];
    oDestr?: ObjectDestructure[];
    expr?: Expression;
}

declare interface VarStatement extends ScripNodeBase {
    type: VAR_STATEMENT;
    decls: ReactiveVarDeclaration[];
}

declare class VStackDriver extends StackDriver {
}

declare type WHILE_STATEMENT = typeof T_WHILE_STATEMENT;

declare interface WhileStatement extends ScripNodeBase {
    type: WHILE_STATEMENT;
    cond: Expression;
    body: Statement;
}

declare type WorkerFixtures = {
    _sharedContext: BrowserContext;
    _sharedPage: Page;
};

export { }


declare module "@tanstack/table-core" {
    interface TableMeta<TData extends RowData> {
        cellRenderer: (...args: any[]) => any;
    }
    interface ColumnMeta<TData extends RowData, TValue> {
        style?: CSSProperties;
        className?: string;
        starSizedWidth?: string;
        accessorKey?: string;
        pinTo?: string;
        cellRenderer?: (row: any, rowIdx: number, colIdx: number, value?: any) => ReactNode;
    }
}
