import type { IHttpHistory } from '@api-client/core/models/HttpHistory.js';
import type { IRequestLog, RequestLog } from '@api-client/core/models/RequestLog.js';
import { TemplateResult, PropertyValues, nothing } from 'lit';
import ApiElement from '../ApiElement.js';
import { UiDialogClosingReason } from '../../md/dialog/internals/Dialog.js';
import '@github/relative-time-element';
import '../../define/http/http-request-log.js';
import '../../md/icons/ui-icon.js';
import '../../md/button/ui-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/divider/ui-divider.js';
import '../../md/segmented-button/ui-segmented-button.js';
import '../../md/segmented-button/ui-segmented-button-set.js';
import '../../md/dialog/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.
     */
    accessor history: IHttpHistory[];
    /**
     * The key of the project the request belongs to.
     */
    accessor project: string | undefined;
    /**
     * The key of the request to render the history for.
     * Both `request` and `project` properties must be set to render any view.
     */
    accessor request: string | undefined;
    /**
     * Returns true when the element is correctly setup.
     */
    get isSetup(): boolean;
    /**
     * Whether querying for a page of results.
     */
    accessor querying: boolean;
    /**
     * A sorted list of history items by the `midnight` property.
     */
    protected accessor model: IHttpHistory[][] | undefined;
    /**
     * The key of the selected request, if any
     */
    accessor selectedItem: string | undefined;
    /**
     * The currently rendered item.
     */
    protected accessor renderedItem: IHttpHistory | IRequestLog | RequestLog | undefined;
    protected accessor view: ProjectHistoryView;
    protected debounceTimeout?: number;
    /**
     * The cursor returned by the store used in pagination.
     */
    protected pageCursor?: string;
    protected willUpdate(cp: PropertyValues<this>): 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