import { PropertyValues, TemplateResult } from 'lit';
import { type IProperty, Property } from '@api-client/core/models/Property.js';
import { HeadersArray } from '@api-client/core/models/HeadersArray.js';
import ApiElement from '../ApiElement.js';
import '../../md/button/ui-button.js';
import '../../md/icon-button/ui-icon-button.js';
import '../../md/dropdown-list/ui-dropdown-list.js';
import '../../md/list/ui-list.js';
import '../../md/list/ui-list-item.js';
import '../../md/switch/ui-switch.js';
import '../../md/divider/ui-divider.js';
import '../../md/icons/ui-icon.js';
/**
 * An editor that creates HTTP headers as a data model that can be translated into a headers string.
 */
export default class HeadersForm extends ApiElement {
    /**
     * When set the editor is in read only mode.
     * @attribute
     */
    accessor readOnly: boolean;
    /**
     * Whether the text editor is rendered instead of the form.
     * @attribute
     */
    accessor text: boolean;
    /**
     * The headers model.
     */
    accessor model: IProperty[];
    protected accessor internalModel: HeadersArray;
    protected accessor textValue: string | undefined;
    protected autocompleteMap: Record<string, string[]>;
    constructor();
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected update(cp: PropertyValues<this>): void;
    protected setupHeaders(headers?: string): void;
    /**
     * Updates header value. It the header does not exists at the position it adds a new header.
     * @param index The position at which the header is located
     * @param value Header value
     */
    updateHeaderValue(index: number, value: string): void;
    /**
     * Updates header value. It the header does not exists at the position it adds a new header.
     * @param name The name of the header to update.
     * @param value Header value
     */
    updateHeaderValue(name: string, value: string): void;
    /**
     * Updates header name. It the header does not exists at the position it adds a new header.
     * @param index The position at which the header is located
     * @param value The header name
     */
    updateHeaderName(index: number, value: string): void;
    /**
     * Updates header name. It the header does not exists at the position it adds a new header.
     * @param name The name of the header to update.
     * @param value The header name
     */
    updateHeaderName(name: string, value: string): void;
    protected setupValueAutocomplete(name: string, index: number): void;
    /**
     * Removes a header from the list.
     * @param name The name of the header to remove
     */
    removeHeader(name: string): void;
    /**
     * Removes a header from the list.
     * @param index The position of the header to remove
     */
    removeHeader(index: number): void;
    /**
     * Adds a header to the list of headers
     */
    addHeader(name?: string, value?: string): void;
    /**
     * Removes all parameters.
     */
    clear(): void;
    /**
     * Toggles enabled state of a header.
     */
    toggleHeader(index: number, enabled: boolean): void;
    /**
     * Toggles the state between form and text editors.
     */
    toggle(): void;
    copyToClipboard(): Promise<void>;
    protected handleGlobalContentType(e: CustomEvent): void;
    /**
     * Updates the `value` from the current model and dispatches the value change event
     */
    protected propagateModelChange(): void;
    protected focusLast(): Promise<void>;
    protected handleAdd(): void;
    protected handleOption(e: CustomEvent): void;
    protected handleNameChange(e: Event): void;
    protected handleValueChange(e: Event): void;
    protected handleRemove(e: Event): void;
    protected handleToggle(e: Event): void;
    protected handleText(e: Event): void;
    protected handleCopy(): void;
    protected render(): TemplateResult;
    protected renderActionButtons(): TemplateResult;
    protected renderEditor(): TemplateResult;
    protected renderText(): TemplateResult;
    protected renderList(): TemplateResult;
    protected renderEmptyMessage(): TemplateResult;
    protected renderParams(items: HeadersArray): TemplateResult;
    protected renderParam(item: Property, index: number): TemplateResult;
    protected renderToggleButton(item: Property, index: number): TemplateResult;
    protected renderDeleteParameter(index: number): TemplateResult;
    protected renderNameField(item: Property, index: number): TemplateResult;
    protected renderValueField(item: Property, index: number): TemplateResult;
    protected renderNamesList(): TemplateResult;
    protected renderAutocompleteLists(): TemplateResult[];
}
//# sourceMappingURL=HeadersForm.d.ts.map