import { TemplateResult, CSSResult } from 'lit';
import { type IEnvironment } from '@api-client/core/models/Environment.js';
import { type IProperty } from '@api-client/core/models/Property.js';
import { type IServer } from '@api-client/core/models/Server.js';
import { type AuthorizationType } from '@api-client/core/models/Authorization.js';
import { type IRequestAuthorization, RequestAuthorization } from '@api-client/core/models/RequestAuthorization.js';
import ApiElement from '../ApiElement.js';
import { TabSelectionDetail } from '../../md/tabs/internals/Tabs.js';
import '../../define/environment/server-editor.js';
import '../../define/environment/variables-editor.js';
import '../../md/icons/ui-icon.js';
import '../../md/text-field/ui-filled-text-field.js';
import '../../md/switch/ui-switch.js';
import '../../md/icon-button/ui-icon-button.js';
import '../../md/button/ui-button.js';
import '../../md/divider/ui-divider.js';
import '../../md/tabs/ui-tabs.js';
import '../../md/tabs/ui-tab.js';
import '../../define/authorization/basic-authorization.js';
import '../../define/authorization/bearer-authorization.js';
import '../../define/authorization/ntlm-authorization.js';
import '../../define/authorization/apikey-authorization.js';
import '../../define/authorization/oauth2-authorization.js';
import '../../define/authorization/oidc-authorization.js';
import '../../define/authorization/cc-authorization.js';
type EditorPage = 'server' | 'variables' | 'authorization';
/**
 * An element that renders a form to set up an environment.
 */
export default class EnvironmentEditor extends ApiElement {
    static get styles(): CSSResult[];
    /**
     * The environment schema to edit.
     */
    accessor environment: IEnvironment;
    /**
     * Redirect URL for the OAuth2 authorization.
     * If can be also set by dispatching `oauth2-redirect-url-changed`
     * with `value` property on the `detail` object.
     * @attribute
     */
    accessor oauth2RedirectUri: string | undefined;
    accessor encapsulateHelp: boolean;
    /**
     * @attribute
     */
    accessor selected: EditorPage;
    constructor();
    updateName(value: string): void;
    updateEncapsulated(value: boolean): void;
    deleteServer(): void;
    updateVariables(value?: IProperty[]): void;
    protected handleServerChange(e: Event): void;
    protected handleVariableChange(e: Event): void;
    protected _createServerHandler(): void;
    protected handleEncapsulatedChange(e: Event): void;
    protected handleNameChange(e: Event): void;
    protected handleToggleHelp(): void;
    protected handleServerDelete(): void;
    protected handleAuthAdd(e: CustomEvent): void;
    /**
     * Adds a new authorization object to the request for the given type.
     *
     * @returns The created instance of the authorization.
     */
    addAuthorization(type: AuthorizationType): RequestAuthorization;
    protected handleAuthChange(e: Event): void;
    protected handleAuthDelete(e: Event): void;
    /**
     * Updates authorization schema on the editor.
     * @param schema The new schema to replace the old one
     * @param isValid Whether the schema is valid.
     */
    updateAuthorization(schema: IRequestAuthorization, isValid: boolean): void;
    /**
     * Removes authorization schema from the editor.
     * @param type The authorization type to remove.
     */
    removeAuthorization(type: string): void;
    protected handleTabSelection(e: CustomEvent<TabSelectionDetail>): void;
    protected render(): TemplateResult;
    protected renderHeader(): TemplateResult;
    protected renderPage(): TemplateResult;
    protected renderEnvironmentEditor(): TemplateResult;
    protected renderNameInput(): TemplateResult;
    protected renderEncapsulate(): TemplateResult;
    protected renderEncapsulateInput(): TemplateResult;
    protected renderEncapsulateInfoToggle(): TemplateResult;
    protected renderServerTemplate(): TemplateResult;
    protected renderNoServer(): TemplateResult;
    protected renderServerEditor(server: IServer): TemplateResult;
    protected renderVariables(): TemplateResult;
    protected renderVariablesEditor(): TemplateResult;
    protected renderAuthorization(): TemplateResult;
    protected renderAuthorizationActions(current?: IRequestAuthorization[]): TemplateResult;
    protected renderAuthorizationOptions(available: string[]): TemplateResult;
    protected renderAuthorizationList(authorization?: IRequestAuthorization[]): TemplateResult[];
    protected renderEmptyAuthorization(): TemplateResult;
    protected renderBasicAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderBearerAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderNtlmAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderOauthAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderOidcAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderCCAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderApiKeyAuthorization(auth: IRequestAuthorization): TemplateResult;
    protected renderTabs(): TemplateResult;
}
export {};
//# sourceMappingURL=EnvironmentEditor.d.ts.map