import { PageAgent, PageAgentOpt } from './agent.js';
import { Page } from 'playwright';
import { c as WebPage } from './page-1e107f16.js';
import { AgentWaitForOpt } from '@midscene_spp/core';
import { TestInfo } from '@playwright/test';
export { overrideAIConfig } from '@midscene_spp/shared/env';
import '@midscene_spp/core/ai-model';
import '@midscene_spp/shared/extractor';
import 'puppeteer';
import '@midscene_spp/shared/logger';
import '@midscene_spp/shared/constants';

declare const PlaywrightAiFixture: (options?: {
    forceSameTabNavigation?: boolean;
    waitForNetworkIdleTimeout?: number;
}) => {
    agentForPage: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    ai: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiAction: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiTap: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiHover: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiInput: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiKeyboardPress: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiScroll: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiQuery: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiAssert: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiWaitFor: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiLocate: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiNumber: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiString: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
    aiBoolean: ({ page }: {
        page: Page;
    }, use: any, testInfo: TestInfo) => Promise<void>;
};
type PlayWrightAiFixtureType = {
    agentForPage: (page?: any, opts?: any) => Promise<PageAgent>;
    ai: <T = any>(prompt: string) => Promise<T>;
    aiAction: (taskPrompt: string) => ReturnType<PageAgent['aiAction']>;
    aiTap: (...args: Parameters<PageAgent['aiTap']>) => ReturnType<PageAgent['aiTap']>;
    aiHover: (...args: Parameters<PageAgent['aiHover']>) => ReturnType<PageAgent['aiHover']>;
    aiInput: (...args: Parameters<PageAgent['aiInput']>) => ReturnType<PageAgent['aiInput']>;
    aiKeyboardPress: (...args: Parameters<PageAgent['aiKeyboardPress']>) => ReturnType<PageAgent['aiKeyboardPress']>;
    aiScroll: (...args: Parameters<PageAgent['aiScroll']>) => ReturnType<PageAgent['aiScroll']>;
    aiQuery: <T = any>(...args: Parameters<PageAgent['aiQuery']>) => ReturnType<PageAgent['aiQuery']>;
    aiAssert: (...args: Parameters<PageAgent['aiAssert']>) => ReturnType<PageAgent['aiAssert']>;
    aiWaitFor: (assertion: string, opt?: AgentWaitForOpt) => Promise<void>;
    aiLocate: (...args: Parameters<PageAgent['aiLocate']>) => ReturnType<PageAgent['aiLocate']>;
    aiNumber: (...args: Parameters<PageAgent['aiNumber']>) => ReturnType<PageAgent['aiNumber']>;
    aiString: (...args: Parameters<PageAgent['aiString']>) => ReturnType<PageAgent['aiString']>;
    aiBoolean: (...args: Parameters<PageAgent['aiBoolean']>) => ReturnType<PageAgent['aiBoolean']>;
};

declare class PlaywrightAgent extends PageAgent<WebPage> {
    constructor(page: Page, opts?: PageAgentOpt);
    waitForNetworkIdle(timeout?: number): Promise<void>;
}

export { type PlayWrightAiFixtureType, PlaywrightAgent, PlaywrightAiFixture, WebPage as PlaywrightWebPage };
