import { LitElement, TemplateResult, PropertyValues } from 'lit';
import { type IRequestLog, RequestLog } from '@api-client/core/models/RequestLog.js';
import { Headers } from '@api-client/core/lib/headers/Headers.js';
import type { SentRequest } from '@api-client/core/models/SentRequest.js';
import type { ErrorResponse } from '@api-client/core/models/ErrorResponse.js';
import type { Response } from '@api-client/core/models/Response.js';
import '../../md/icons/ui-icon.js';
import '../../md/divider/ui-divider.js';
/**
 * An element that renders summary headers view for an HTTP response.
 */
export default class LogHeaders extends LitElement {
    private httpLogInternal?;
    /**
     * This property is set when the `httpLog` is set. It always represent an instance
     * of the `RequestLog` (or undefined) regardless of the input format.
     */
    protected accessor effectiveLog: RequestLog | undefined;
    /**
     * The request log to render. When not set it renders nothing.
     */
    get httpLog(): IRequestLog | RequestLog | undefined;
    set httpLog(value: IRequestLog | RequestLog | undefined);
    protected accessor activeItem: string | undefined;
    protected accessor focusedItem: string | undefined;
    /**
     * The currently focused node.
     */
    protected focusedElement?: HTMLElement;
    /**
     * Parsed request headers, when the request is set.
     */
    protected accessor requestHeaders: Headers | undefined;
    /**
     * Parsed response headers, when the response is set.
     */
    protected accessor responseHeaders: Headers | undefined;
    /**
     * The list of ids of tree parents that are opened.
     */
    protected openedParents: string[];
    constructor();
    connectedCallback(): void;
    protected updated(cp: PropertyValues): void;
    /**
     * Manages the state of the tabindex attribute of the element.
     * When the user changes the focus in the tree then the tabindex is removed from the element
     * and moved to the focused element.
     * When there's no focused element, the tabindex is again set on the element.
     */
    protected manageTabindex(): void;
    /**
     * Processes the request and response headers when the setter is invoked.
     * This way we can cache results instead of generating the headers in the
     * template.
     */
    protected parseHeaders(): void;
    protected handleFocus(): void;
    protected handleKeydown(e: KeyboardEvent): void;
    protected handleItemC(e: KeyboardEvent, node: HTMLElement): Promise<void>;
    protected handleClick(e: Event): void;
    protected handleDblclick(e: Event): void;
    protected toggleParent(key: string): void;
    protected findClosestListItem(e: Event): HTMLElement | undefined;
    /**
     * 1. When focus is on a closed node, opens the node; focus does not move.
     * 2. When focus is on a open node, moves focus to the first child node.
     * 3. When focus is on an end node (a tree item with no children), does nothing.
     */
    protected handleItemRight(node: HTMLElement): void;
    /**
     * 1. When focus is on an open node, closes the node.
     * 2. When focus is on a child node that is also either an end node or a closed node, moves focus to its parent node.
     * 3. When focus is on a closed `tree`, does nothing.
     */
    protected handleItemLeft(node: HTMLElement): void;
    /**
     * Moves focus to the next node that is focusable without opening or closing a node.
     */
    protected handleItemDown(node: HTMLElement): void;
    /**
     * Moves focus to the previous node that is focusable without opening or closing a node.
     */
    protected handleItemUp(node: HTMLElement): void;
    protected handleHome(): void;
    protected handleEnd(): void;
    /**
     * Performs the default action of the currently focused node.
     * For parent nodes, it opens or closes the node.
     * In single-select trees, if the node has no children, selects the current node
     * if not already selected (which is the default action).
     */
    protected handleItemEnter(node: HTMLElement): void;
    /**
     * Focuses on the first descendant of a folder item.
     *
     * @param node The list containing children to focus on.
     * @returns true when focused on any of the descendants
     */
    protected focusFirstDescendant(node: HTMLOListElement): boolean;
    /**
     * Focuses on the last descendant of a folder item.
     *
     * @param node The list containing children to focus on.
     * @returns true when focused on any of the descendants
     */
    protected focusLastDescendant(node: HTMLOListElement): boolean;
    protected focusListItem(node: HTMLElement): void;
    /**
     * Focuses on the next node relative to the passed node.
     *
     * @param node The node to use as a mark. When not set it uses the currently focused node.
     * @returns true when focused on any of the next siblings
     */
    protected focusNextSibling(node: HTMLElement): boolean;
    protected focusPreviousSibling(node: HTMLElement): boolean;
    /**
     * Focuses on a first parent list item that accepts focus relative to the given node.
     *
     * @param node The node to use as a reference.
     * @returns true when focused on any of the parents
     */
    protected focusFirstParent(node: HTMLElement): boolean;
    protected findParentListItem(node: HTMLElement): HTMLLIElement | undefined;
    protected render(): TemplateResult;
    protected renderListItem(name: string, value: string | TemplateResult, id: string): TemplateResult;
    protected renderParentListItem(label: string, id: string): TemplateResult;
    protected renderChildrenItems(id: string, items: TemplateResult | TemplateResult[]): TemplateResult;
    protected RenderRequestGeneral(sent?: SentRequest, response?: Response | ErrorResponse): TemplateResult;
    protected renderResponseStatus(id: string, response?: Response | ErrorResponse): TemplateResult | string;
    protected renderRequestHeaders(): TemplateResult;
    protected renderResponseHeaders(): TemplateResult;
    protected renderHeadersList(prefix: string, headers?: Headers): TemplateResult;
}
//# sourceMappingURL=LogHeaders.d.ts.map