import { TemplateResult, PropertyValues, nothing } from 'lit';
import { HttpProject, ProjectFolder, IProjectRunnerOptions, IProjectExecutionLog, IApplication, IProjectExecution, ProjectExecutionDeleteBroadcastEvent, ProjectExecutionCreatedBroadcastEvent } from '@api-client/core/build/browser.js';
import ApiElement from '../ApiElement.js';
import '@github/relative-time-element';
import '../../define/http-project/project-run-report.js';
import '../../define/ui/ui-checkbox.js';
import '../../define/ui/ui-text-field.js';
import '../../define/ui/ui-button.js';
import '../../define/ui/ui-progress.js';
import '../../define/ui/ui-icon.js';
import '../../define/ui/ui-dropdown-list.js';
import '../../define/ui/ui-list.js';
import '../../define/ui/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.
     */
    sharedVariables?: Record<string, string>;
    /**
     * The instance of the current project.
     */
    project?: HttpProject;
    /**
     * This property is required for the API access to work.
     * Set it to the current application information.
     */
    appInfo?: IApplication;
    /**
     * The key of the folder to render the runner for.
     * When not set, it renders the runner for the project.
     * @attribute
     */
    folder?: string;
    /**
     * The object we operate on.
     */
    protected root?: HttpProject | ProjectFolder;
    /**
     * Whether the element is currently running the project execution.
     */
    protected running?: boolean;
    /**
     * Whether the element is currently querying for the history data.
     */
    protected querying?: boolean;
    /**
     * The page cursor for pagination.
     */
    protected pageCursor?: string;
    /**
     * The run configuration.
     */
    config?: IProjectRunnerOptions;
    protected lastError?: string;
    protected history: IProjectExecution[];
    protected queryPageDebouncer?: number;
    debounceTimeout: number;
    /**
     * The key of the currently rendered report.
     */
    protected selectedReport?: string;
    /**
     * The currently rendered report.
     */
    renderedReport?: IProjectExecution;
    channel: BroadcastChannel;
    constructor();
    connectedCallback(): void;
    disconnectedCallback(): void;
    willUpdate(cp: PropertyValues<this>): void;
    protected handleBroadcast(e: MessageEvent): void;
    protected setupRoot(): void;
    protected handleProjectRunCreated(event: ProjectExecutionCreatedBroadcastEvent): void;
    protected handleProjectRunDeleted(event: ProjectExecutionDeleteBroadcastEvent): 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