import { nothing, PropertyValues, TemplateResult } from 'lit';
import { ProjectRequest, HttpRequest, HttpProject, IRequestLog, IApplication, DeserializedPayload, IHttpProjectProxyInit, Environment, IProperty, RequestAuthorization, IRequestAuthorization, IHttpProjectStoreProxyInit, IProxyResult, IProjectExecutionLog, IHttpAssertion, IRequestConfig, IHttpFlow } from '@api-client/core/build/browser.js';
import { AuthorizationType } from '@api-client/core/build/src/models/Authorization.js';
import { JsonPatchOperation } from '@api-client/json';
import RequestEditor from '../http/RequestEditor.js';
import '../../define/ui/ui-icon.js';
import '../../define/ui/ui-button.js';
import '../../define/ui/ui-dropdown-list.js';
import '../../define/ui/ui-list.js';
import '../../define/ui/ui-list-item.js';
/**
 * An element that specializes in rendering an HTTP request that is defined on an HttpProject.
 *
 * When using this element set the `project` property to the currently opened
 * project and the `key` to the request to render.
 * The element will hook-up to the events to support project mutations.
 */
export default class HttpProjectRequest extends RequestEditor {
    /**
     * A reference to the global shared variables.
     * Used with the communication with the execution server.
     */
    sharedVariables?: Record<string, string>;
    /**
     * The source project
     */
    project?: HttpProject;
    /**
     * The key of the request being processed.
     * @attribute
     */
    key?: string;
    /**
     * This property is required for the API access to work.
     * Set it to the current application information.
     */
    appInfo?: IApplication;
    /**
     * The read `expects` value from the project request.
     */
    protected expects?: HttpRequest;
    /**
     * The read project request object from the project.
     */
    protected projectRequest?: ProjectRequest;
    /**
     * The list of environments that apply to the current request.
     */
    protected environments?: Environment[];
    /**
     * Computed value of the environment to render in the environment selector.
     * Because of the complexity of finding the name, it is computed on `environment` change only.
     */
    protected environmentLabel?: string;
    /**
     * When set the requests sent from the editor will contain the entire project serialized with the request
     * rather just the id of the project. This is used in HTTP Client that doesn't use the net-store
     * and uses local proxy.
     * @attribute
     */
    useNetStore?: boolean;
    constructor();
    protected willUpdate(cp: PropertyValues<this>): void;
    applyPatch(info: JsonPatchOperation): void;
    protected cleanup(): void;
    protected setupRequest(): void;
    /**
     * Reads environments to be applies to the request and sets up local variables.
     */
    protected setupRequestEnvironments(request: ProjectRequest): void;
    selectVerb(verb: string): void;
    selectUrl(value: string): void;
    selectHeaders(model: IProperty[]): void;
    selectAssertions(assertions?: IHttpAssertion[]): void;
    selectFlows(flows?: IHttpFlow[]): void;
    selectRequestConfig(config: IRequestConfig): void;
    protected updatePayload(value: DeserializedPayload, mime?: string): Promise<void>;
    addAuthorization(type: AuthorizationType): RequestAuthorization;
    updateAuthorization(schema: IRequestAuthorization, isValid: boolean): void;
    removeAuthorization(type: string): void;
    protected notifySend(): void;
    protected prepareProxyInit(project: HttpProject, key: string, request: ProjectRequest): IHttpProjectProxyInit | IHttpProjectStoreProxyInit;
    protected proxyRequest(init: IHttpProjectProxyInit | IHttpProjectStoreProxyInit): Promise<IProxyResult<IProjectExecutionLog> | undefined>;
    protected execute(): Promise<void>;
    mergeExecutedVariables(vars: Record<string, string>): void;
    protected addHistory(report: IRequestLog): Promise<void>;
    protected handleEnvironmentSelection(e: CustomEvent): void;
    protected computeEnvironmentLabel(): void;
    protected computeSnippetsRequest(): Promise<void>;
    protected renderUrlMeta(): TemplateResult;
    protected renderEnvironmentSelector(): TemplateResult | typeof nothing;
    protected renderEnvironmentOptions(environments: Environment[]): TemplateResult[];
    protected renderEnvironmentItem(env: Environment): TemplateResult;
    protected renderEmptyAuthorization(): TemplateResult;
}
//# sourceMappingURL=HttpProjectRequest.d.ts.map