import { TemplateResult, CSSResult, PropertyValues } from 'lit';
import { type IProperty } from '@api-client/core/models/Property.js';
import { type IServer, Server } from '@api-client/core/models/Server.js';
import ApiElement from '../ApiElement.js';
import '../../md/text-field/ui-filled-text-field.js';
import '../../md/icons/ui-icon.js';
import '../../md/icon-button/ui-icon-button.js';
export declare const DefaultProtocols: string[];
/**
 * An element to render a view for a server definition with a form to edit it.
 *
 * @fires change - When a value change.
 * @fires delete - When the user requested server definition delete.
 */
export default class ServerEditor extends ApiElement {
    static get styles(): CSSResult[];
    /**
     * The base URI of the server.
     *
     * Note, the URL can contain URI templates (e.g. `http://{host}.api.com/v1`)
     * In this case the variable is replaced with the system or project variables.
     *
     * For simplicity, the `uri` can be the full base URI with protocol, host, and the `basePath`
     *
     * @attribute
     */
    accessor uri: string | undefined;
    /**
     * Usually included in the `uri`. When the `uri` is missing a protocol
     * this is then used.
     *
     * @attribute
     */
    accessor protocol: string | undefined;
    /**
     * The base path for the server. It starts with the `/`.
     * When set, it is appended to the `uri` value.
     *
     * @attribute
     */
    accessor basePath: string | undefined;
    /**
     * Optional description of the server.
     *
     * @attribute
     */
    accessor description: string | undefined;
    /**
     * Optional list of variables to set on the environment.
     * When set it evaluates the final URI value against these properties.
     */
    accessor variables: IProperty[] | undefined;
    /**
     * The computed value of the full URI from the values.
     */
    protected valueInternal?: string;
    /**
     * The server logic used with computations.
     */
    protected serverInternal: Server;
    protected accessor protocolInput: HTMLInputElement | null;
    protected willUpdate(cp: PropertyValues<this>): void;
    /**
     * Updates the value of the generated base URI.
     * This can be called from the outside of the component to force computation.
     * This is helpful when deep-updating variables.
     */
    generateValue(): void;
    protected setupValue(): void;
    protected updateServer(): void;
    /**
     * Creates a schema for the current values.
     */
    getSchema(): IServer;
    /**
     * Updates name/value of a parameter on a specific index.
     */
    updateProperty(field: 'uri' | 'basePath' | 'protocol', value: string): void;
    protected handleUriChange(e: Event): void;
    protected handleBasePathChange(e: Event): void;
    protected handleProtocolChange(e: Event): void;
    protected handleDelete(): void;
    render(): TemplateResult;
    protected renderHeader(): TemplateResult;
    protected renderUriInput(): TemplateResult;
    protected renderProtocolInput(): TemplateResult;
    protected renderBasePathInput(): TemplateResult;
    protected renderValue(): TemplateResult | string;
    protected renderDeleteButton(): TemplateResult;
}
//# sourceMappingURL=ServerEditor.d.ts.map