import { IHttpHistory, IRequestLog, RequestLog, HistoryCreatedBroadcastEvent, HistoryDeletedBroadcastEvent } from "@api-client/core/build/browser.js";
import { TemplateResult, PropertyValues, nothing } from "lit";
import ApiElement from "../ApiElement.js";
import { UiDialogClosingReason } from "../../ui/dialog/UiDialog.js";
import '@github/relative-time-element';
import '../../define/http/http-request-log.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';
import '../../define/ui/ui-divider.js';
import '../../define/ui/ui-segmented-button.js';
import '../../define/ui/ui-segmented-button-set.js';
import '../../define/ui/ui-dialog.js';
export declare enum ProjectHistoryView {
    history = "history",
    analysis = "analysis"
}
/**
 * An element that renders HTTP history for a configured list of requests.
 * This element is just a view and contains no logic related to store communication
 * or user interactions. Use the dispatched events to handle user interactions.
 */
export default class HttpProjectRequestHistory extends ApiElement {
    /**
     * The history list to render.
     */
    history: IHttpHistory[];
    /**
     * The key of the project the request belongs to.
     */
    project?: string;
    /**
     * The key of the request to render the history for.
     * Both `request` and `project` properties must be set to render any view.
     */
    request?: string;
    /**
     * Returns true when the element is correctly setup.
     */
    get isSetup(): boolean;
    /**
     * Whether querying for a page of results.
     */
    querying: boolean;
    /**
     * A sorted list of history items by the `midnight` property.
     */
    protected model?: IHttpHistory[][];
    /**
     * The key of the selected request, if any
     */
    selectedItem?: string;
    /**
     * The currently rendered item.
     */
    protected renderedItem?: IHttpHistory | IRequestLog | RequestLog;
    protected view: ProjectHistoryView;
    protected debounceTimeout?: number;
    /**
     * The cursor returned by the store used in pagination.
     */
    protected pageCursor?: string;
    channel: BroadcastChannel;
    constructor();
    protected willUpdate(cp: PropertyValues<this>): void;
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected handleBroadcast(e: MessageEvent): void;
    protected handleHistoryCreated(event: HistoryCreatedBroadcastEvent): void;
    protected handleHistoryDeleted(event: HistoryDeletedBroadcastEvent): void;
    protected setupVisibility(): void;
    reset(): void;
    queryDebounce(): void;
    protected queryPage(): Promise<void>;
    addItems(items: IHttpHistory[]): void;
    /**
     * Adds a new history to the list.
     * This is used instead of re-assigning the entire array and triggering initial computations.
     * @param item The history item to add
     * @param select When true it makes this item selected,
     */
    addItem(item: IHttpHistory, select?: boolean): void;
    protected sortHistory(history: IHttpHistory[]): IHttpHistory[][];
    protected computeSelectedItem(): void;
    /**
     * Allows to push a history item into a right index depending on the `created` property
     * so the data processor can skip sorting each group after mutation.
     *
     * The item is inserted before an item that is older (has lower `created` property).
     *
     * @param list The list to insert the item to
     * @param item The item to insert.
     */
    protected pushSorted(list: IHttpHistory[], item: IHttpHistory): void;
    protected handleSelection(e: CustomEvent): void;
    protected handleViewSelection(e: CustomEvent): void;
    protected handleHistoryOption(e: CustomEvent): void;
    protected triggerClearHistoryDialog(): void;
    protected handleClearHistoryDialogResult(e: CustomEvent<UiDialogClosingReason>): void;
    clearHistory(): Promise<void>;
    protected handleItemDelete(e: Event): void;
    deleteHistoryItem(key: string): Promise<void>;
    revertHistoryItemDelete(item: IHttpHistory): Promise<void>;
    protected render(): TemplateResult | typeof nothing;
    protected renderLoader(): TemplateResult;
    protected renderHeader(): TemplateResult;
    protected renderHistoryDropdown(): TemplateResult;
    protected renderHistoryOptions(): TemplateResult;
    protected renderHistoryList(): (TemplateResult | typeof nothing)[] | typeof nothing;
    protected renderHistoryGroup(group: IHttpHistory[]): TemplateResult | typeof nothing;
    protected renderHistoryGroupTitle(item: IHttpHistory): TemplateResult;
    protected renderHistoryItem(item: IHttpHistory): TemplateResult | typeof nothing;
    protected renderHistoryItemDelete(item: IHttpHistory): TemplateResult | typeof nothing;
    protected renderView(): TemplateResult | string;
    protected renderLog(): TemplateResult | string;
    protected renderAnalysis(): TemplateResult | string;
    protected renderViewToggle(): TemplateResult;
    protected renderClearHistoryDialog(): TemplateResult;
}
//# sourceMappingURL=HttpProjectRequestHistory.d.ts.map