import type { IHttpAction, IHttpFlow } from '@api-client/core/models/http-flows/HttpFlows.js';
import { type IHttpStep } from '@api-client/core/models/http-flows/HttpStep.js';
import { PropertyValues, TemplateResult } from 'lit';
import type { UiDropdownListSelection } from '../../md/dropdown-list/internals/UiDropdownList.js';
import type UiDialog from '../../md/dialog/internals/Dialog.js';
import type { UiDialogClosingReason } from '../../md/dialog/internals/Dialog.js';
import { HttpFlowsUi, StepsTarget } from './HttpFlowsUi.js';
import '../../md/list/ui-list.js';
import '../../md/list/ui-list-item.js';
import '../../md/dropdown-list/ui-dropdown-list.js';
import '../../md/button/ui-button.js';
import '../../md/divider/ui-divider.js';
import '../../md/dialog/ui-dialog.js';
import '../dialog/rename-dialog.js';
type FlowTrigger = 'request' | 'response';
export default class HttpFlows extends HttpFlowsUi {
    /**
     * The list of HTTP flows.
     * This is a live list. All changes are propagated in the model.
     */
    accessor model: IHttpFlow[];
    /**
     * The setting that renders flows for the given trigger (request or response).
     */
    accessor trigger: FlowTrigger;
    /**
     * The index of the currently selected flow. This is the index on the `model` property.
     * @attribute
     */
    accessor selectedFlow: number | undefined;
    accessor flowAddDialog: UiDialog | null;
    /**
     * The currently selected flow definition.
     *
     * If there's no selection it returns the first flow.
     */
    get currentFlow(): IHttpFlow | undefined;
    connectedCallback(): void;
    protected willUpdate(cp: PropertyValues<this>): void;
    preSelectFlow(): void;
    addFlow(description?: string): void;
    removeFlow(index: number): void;
    removeFlowAction(actionIndex: number): void;
    renameFlowAction(actionIndex: number): void;
    protected handleAdd(): void;
    protected handleTriggerSelect(e: CustomEvent<UiDropdownListSelection>): void;
    protected handleFlowSelect(e: CustomEvent<UiDropdownListSelection>): void;
    protected handleFlowCreateDialogResult(e: CustomEvent<UiDialogClosingReason>): void;
    /**
     * On the editor element we only allow "flow blocks" items (conditions and actions).
     * Only one condition can be added so once a condition is set we do not allow to add another condition.
     */
    protected handleEditorDragOver(e: DragEvent): void;
    protected handleEditorDragLeave(e: DragEvent): void;
    protected handleEditorDrop(e: DragEvent): void;
    /**
     * Adds a condition to the current flow.
     * Note, when the condition already exists this does nothing.
     */
    setCondition(): void;
    addAction(): void;
    protected stepFromChangeEvent(e: Event): IHttpStep | undefined;
    protected getStepsTarget(assertionOrActionIndex: number): StepsTarget | undefined;
    protected handleConditionOption(e: CustomEvent<UiDropdownListSelection>): void;
    protected handleActionOption(e: CustomEvent<UiDropdownListSelection>): void;
    protected isConditionTarget(e: Event): boolean;
    /**
     * We override this method tpo handle conditions which can only accept certain
     * blocks and have index of `-1`
     */
    protected handleTargetDragOver(e: DragEvent): void;
    /**
     * Overrides the method to support conditions.
     */
    protected handleDrop(e: DragEvent): void;
    protected render(): TemplateResult;
    protected renderActionButtons(): TemplateResult;
    protected renderTriggerSelector(): TemplateResult;
    protected renderFlowSelector(): TemplateResult;
    protected renderCreateFlowDialog(): TemplateResult;
    protected renderEditor(): TemplateResult;
    protected renderEmptyFlowMessage(): TemplateResult;
    protected renderSelectFlowMessage(): TemplateResult;
    protected renderEmptyActionsMessage(): TemplateResult;
    protected renderCondition(condition: IHttpAction): TemplateResult;
    protected renderList(model: IHttpAction[]): TemplateResult;
    protected renderAction(item: IHttpAction, index: number): TemplateResult;
    protected renderBuildingBlocks(): TemplateResult;
    protected renderFlowBlocksOptions(currentFlow?: IHttpFlow): TemplateResult;
    protected renderDataSourceOptions(currentFlow?: IHttpFlow): TemplateResult;
    protected renderTransformationOptions(currentFlow?: IHttpFlow): TemplateResult;
    protected renderActions(currentFlow?: IHttpFlow): TemplateResult;
    protected renderAssertionOptions(currentFlow?: IHttpFlow): TemplateResult;
    protected renderConditionTabActions(): TemplateResult;
    protected renderStepTabActions(actionIndex: number): TemplateResult;
}
export {};
//# sourceMappingURL=HttpFlows.element.d.ts.map