import { FlowRequestDataEnum, FlowResponseDataEnum, FlowSourceEnum } from '@api-client/core/models/http-flows/HttpFlows.js';
import * as DataSteps from '@api-client/core/models/http-flows/steps/data/index.js';
import * as CoreAssertions from '@api-client/core/models/http-flows/steps/assertion/index.js';
import * as TransformationSteps from '@api-client/core/models/http-flows/steps/transformation/index.js';
import { type IHttpStep } from '@api-client/core/models/http-flows/HttpStep.js';
import { TemplateResult } from 'lit';
import ApiElement from '../ApiElement.js';
import type UiChip from '../../md/chip/internals/Chip.js';
import '../../md/list/ui-list.js';
import '../../md/list/ui-list-item.js';
import '../../md/dropdown-list/ui-dropdown-list.js';
import '../../md/icons/ui-icon.js';
import '../../md/icon-button/ui-icon-button.js';
import '../../md/text-field/ui-filled-text-field.js';
import '../../md/chip/ui-chip.js';
import '../../md/dialog/ui-dialog.js';
import '../dialog/delete-cookie-action-dialog.js';
import '../dialog/set-cookie-action-dialog.js';
export interface ChipCreateInfo {
    source?: FlowSourceEnum;
    data?: FlowRequestDataEnum | FlowResponseDataEnum;
    variant?: string;
    disabled?: boolean;
    title?: string;
}
export interface StepsTarget {
    steps: IHttpStep[];
}
/**
 * The base UI class for HTTP flows and assertions
 * since they are practically the same concept.
 */
export declare abstract class HttpFlowsUi extends ApiElement {
    /**
     * A chip that is currently being dragged in the UI.
     */
    protected draggedChip?: UiChip;
    /**
     * Because of the differences in the model between assertions and flows we need to abstract a method
     * to find an object that contains the `steps` so the logic can operate on it.
     *
     * @param assertionOrActionIndex The index of the assertion or the action in the model.
     */
    protected abstract getStepsTarget(assertionOrActionIndex: number): StepsTarget | undefined;
    /**
     * A method to read an HttpStep from an event.
     */
    protected abstract stepFromChangeEvent(e: Event): IHttpStep | undefined;
    /**
     * Checks whether the dragged element has the required content in the data transfer.
     */
    protected isValidDropTarget(dataTransfer?: DataTransfer | null): boolean;
    /**
     * Handles the suggestion chip drag start event.
     */
    protected handleChipDragStart(e: DragEvent): void;
    /**
     * Handles the suggestion chip drag end event.
     */
    protected handleChipDragEnd(e: DragEvent): void;
    /**
     * When interacting with a chip an MD ripple effect is generated.
     * This causes the default drag image to include the surrounding ripple effect and
     * everything around. This makes a copy of the chip and sets it as the drag image.
     *
     * Note, the copy of the chip has to be added to the DOM and be there for some time
     * so the browser render it and set as the image. Because of that the copy is removed
     * with the drop and not immediately.
     */
    protected illustrateDraggedChip(chip: UiChip, dataTransfer: DataTransfer): void;
    /**
     * Removes all `dragover` classes from elements on the shadow DOM.
     */
    protected resetDragIndices(): void;
    /**
     * A handler for the `dragover` event over a valid target.
     * Sets the `dragover` class on the target.
     */
    protected handleTargetDragOver(e: DragEvent): void;
    /**
     * A handler for the `dragleave` event over a valid target.
     * Removes the `dragover` class from the target.
     */
    protected handleTargetDragLeave(e: DragEvent): void;
    /**
     * Reads the `data-index` and `data-step-index` from the target of the event
     * and calls the `processDrop()` with read values.
     */
    protected handleDrop(e: DragEvent): void;
    /**
     * A logic executed when a suggestion chip drop happens on a valid target.
     *
     * @param dataTransfer The event's dataTransfer object
     * @param assertionOrActionIndex Action's or assertion's index where the drop happened.
     * @param stepIndex The detected index of the step. When not set it adds the step at the end.
     */
    protected processDrop(dataTransfer: DataTransfer, assertionOrActionIndex: number, stepIndex?: number): void;
    /**
     * Processes dropping of a `data-source` suggestion chip.
     */
    protected processDataSourceDrop(dataTransfer: DataTransfer, assertionOrActionIndex: number, stepIndex?: number): void;
    /**
     * Processes dropping of a `transformation` suggestion chip.
     */
    protected processTransformationDrop(dataTransfer: DataTransfer, assertionOrActionIndex: number, stepIndex?: number): void;
    /**
     * Processes dropping of a `assertion` suggestion chip.
     */
    protected processAssertionDrop(dataTransfer: DataTransfer, assertionOrActionIndex: number, stepIndex?: number): void;
    /**
     * Processes dropping of a `action` suggestion chip.
     */
    protected processActionDrop(dataTransfer: DataTransfer, assertionOrActionIndex: number, stepIndex?: number): void;
    protected setupDataSource(target: StepsTarget, dataTransfer: DataTransfer, stepIndex?: number): void;
    protected setupTransformation(target: StepsTarget, dataTransfer: DataTransfer, stepIndex?: number): void;
    protected setupAssertion(target: StepsTarget, dataTransfer: DataTransfer, stepIndex?: number): void;
    protected setupAction(target: StepsTarget, dataTransfer: DataTransfer, stepIndex?: number): void;
    protected appendStep(step: IHttpStep, target: StepsTarget, stepIndex?: number): void;
    protected removeStep(target: StepsTarget, stepIndex: number): void;
    protected handleSubstringStartChange(e: Event): void;
    protected handleSubstringEndChange(e: Event): void;
    protected handleRoundPrecisionChange(e: Event): void;
    protected handleReadValueStepChange(e: Event): void;
    protected handleGreaterThanAssertionValueChange(e: Event): void;
    protected handleLessThanAssertionValueChange(e: Event): void;
    protected handleIncludesAssertionValueChange(e: Event): void;
    protected handleToBeAssertionValueChange(e: Event): void;
    protected handleMatchesAssertionValueChange(e: Event): void;
    protected handleEqualAssertionValueChange(e: Event): void;
    /**
     * Detects the correct data type for the step value based on previous steps.
     *
     * @param steps The steps before the current step
     * @returns The data type for the step in the AMF namespace.
     */
    protected detectInputDataType(steps: IHttpStep[]): string;
    protected validateRegexPattern(e: Event): void;
    protected handleVariableNameChange(e: Event): void;
    protected handleRemoveStep(e: Event): void;
    protected handleConfigureDeleteCookieStep(e: Event): void;
    protected handleConfigureSetCookieStep(e: Event): void;
    protected getEventStepLocation(e: Event): {
        actionIndex: number;
        stepIndex: number;
    } | undefined;
    protected renderBlockChip(label: string, group: string, kind: string, opts?: ChipCreateInfo): TemplateResult;
    protected renderDropSpacer(assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderStepPill(label: string, assertionOrActionIndex: number, stepIndex: number, suffix?: TemplateResult): TemplateResult;
    protected renderSteps(item: StepsTarget, assertionOrActionIndex: number): TemplateResult;
    protected renderEmptyStep(actionIndex: number): TemplateResult;
    protected renderStepsList(steps: IHttpStep[], assertionOrActionIndex: number): TemplateResult[];
    protected renderStep(item: IHttpStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult | undefined;
    protected renderReadDataSourceStep(item: DataSteps.IReadDataSourceStep, actionIndex: number, stepIndex: number): TemplateResult | undefined;
    protected renderReadValueStep(item: DataSteps.IReadValueStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderDeleteCookieStep(item: DataSteps.IDeleteCookieStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderSetCookieStep(item: DataSteps.ISetCookieStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderSetVariableStep(item: DataSteps.ISetVariableStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderDeleteVariableStep(item: DataSteps.IDeleteVariableStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderRoundStep(item: TransformationSteps.IRoundStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderSubstringStep(item: TransformationSteps.ISubstringStep, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderEqualAssertion(item: CoreAssertions.IEqualAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderNotEqualAssertion(item: CoreAssertions.INotEqualAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderGreaterThanAssertion(item: CoreAssertions.IGreaterThanAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderLessThanAssertion(item: CoreAssertions.ILessThanAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderIncludesAssertion(item: CoreAssertions.IIncludesAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderNotIncludesAssertion(item: CoreAssertions.INotIncludesAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderMatchesAssertion(item: CoreAssertions.IMatchesAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderToBeAssertion(item: CoreAssertions.IToBeAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderNotToBeAssertion(item: CoreAssertions.INotToBeAssertion, assertionOrActionIndex: number, stepIndex: number): TemplateResult;
    protected renderResponseDataSourceSuggestions(disabled?: boolean): TemplateResult;
    protected renderRequestDataSourceSuggestions(disabled?: boolean): TemplateResult;
    protected renderTransformationSuggestions(disabled?: boolean): TemplateResult;
    protected renderActionSuggestions(disabled?: boolean): TemplateResult;
    protected renderAssertionSuggestions(disabled?: boolean): TemplateResult;
}
//# sourceMappingURL=HttpFlowsUi.d.ts.map