import { TemplateResult, PropertyValues, nothing } from 'lit';
import { type HttpProject } from '@api-client/core/models/HttpProject.js';
import type { IApplication } from '@api-client/core/models/Application.js';
import type { ProjectFolder } from '@api-client/core/models/ProjectFolder.js';
import type { IProjectRunnerOptions } from '@api-client/core/runtime/node/InteropInterfaces.js';
import type { IProjectExecution, IProjectExecutionLog } from '@api-client/core/models/ProjectExecution.js';
import ApiElement from '../ApiElement.js';
import '@github/relative-time-element';
import '../../define/http-project/project-run-report.js';
import '../../md/checkbox/ui-checkbox.js';
import '../../md/text-field/ui-filled-text-field.js';
import '../../md/button/ui-button.js';
import '../../md/progress/ui-progress.js';
import '../../md/icons/ui-icon.js';
import '../../md/dropdown-list/ui-dropdown-list.js';
import '../../md/list/ui-list.js';
import '../../md/list/ui-list-item.js';
/**
 * @fires change - When the configuration of the runner change.
 */
export default class ProjectRunner extends ApiElement {
    /**
     * A reference to the global shared variables.
     * Used with the communication with the execution server.
     */
    accessor sharedVariables: Record<string, string> | undefined;
    /**
     * The instance of the current project.
     */
    accessor project: HttpProject | undefined;
    /**
     * This property is required for the API access to work.
     * Set it to the current application information.
     */
    accessor appInfo: IApplication | undefined;
    /**
     * The key of the folder to render the runner for.
     * When not set, it renders the runner for the project.
     * @attribute
     */
    accessor folder: string | undefined;
    /**
     * The object we operate on.
     */
    protected accessor root: HttpProject | ProjectFolder | undefined;
    /**
     * Whether the element is currently running the project execution.
     */
    protected accessor running: boolean | undefined;
    /**
     * Whether the element is currently querying for the history data.
     */
    protected accessor querying: boolean | undefined;
    /**
     * The page cursor for pagination.
     */
    protected pageCursor?: string;
    /**
     * The run configuration.
     */
    accessor config: IProjectRunnerOptions | undefined;
    protected accessor lastError: string | undefined;
    protected history: IProjectExecution[];
    protected queryPageDebouncer?: number;
    debounceTimeout: number;
    /**
     * The key of the currently rendered report.
     */
    protected selectedReport?: string;
    /**
     * The currently rendered report.
     */
    accessor renderedReport: IProjectExecution | undefined;
    willUpdate(cp: PropertyValues<this>): void;
    protected setupRoot(): void;
    protected handleRun(): void;
    /**
     * Executes the current configuration.
     */
    execute(): Promise<void>;
    mergeExecutedVariables(result: IProjectExecutionLog): void;
    protected createHistory(result: IProjectExecutionLog): Promise<void>;
    resetHistory(): void;
    queryPageDebounce(): void;
    queryPage(): Promise<void>;
    protected historySort(a: IProjectExecution, b: IProjectExecution): number;
    setRecursive(value: boolean): void;
    setParallel(value: boolean): void;
    setIterations(value: number): void;
    setIterationDelay(value: number): void;
    protected handleRecursiveChecked(e: Event): void;
    protected handleParallelChecked(e: Event): void;
    protected handleIterationsChange(e: Event): void;
    protected handleIterationDelayChange(e: Event): void;
    protected handleHistorySelection(e: CustomEvent): void;
    selectHistory(key: string): void;
    protected render(): TemplateResult;
    protected renderRecursiveOption(): TemplateResult;
    protected renderParallelOption(): TemplateResult;
    protected renderIterationOption(): TemplateResult;
    protected renderIterationDelayOption(): TemplateResult;
    protected renderSubmit(): TemplateResult;
    protected renderLoader(): TemplateResult | string;
    protected renderError(): TemplateResult | string;
    protected renderReport(): TemplateResult | typeof nothing;
    protected renderHistorySelector(): TemplateResult;
    renderHistoryOption(item: IProjectExecution): TemplateResult;
}
//# sourceMappingURL=ProjectRunner.d.ts.map