import { nothing, TemplateResult } from 'lit';
import type { IApiCallback, IApiEndPoint, IApiOperation, IApiResponse, IApiSecurityRequirement, IApiServer } from '@api-client/core/amf/definitions/Api.js';
import { ApiDocumentationBase } from './ApiDocumentationBase.js';
import { TabSelectionDetail } from '../../md/tabs/internals/Tabs.js';
import '../../define/amf/api-request-document.js';
import '../../define/amf/api-response-document.js';
import '../../define/amf/api-security-requirement-document.js';
import '../../md/icons/ui-icon.js';
import '../../md/button/ui-filled-button.js';
import '../../md/tabs/ui-tabs.js';
import '../../md/tabs/ui-tab.js';
import '../../md/divider/ui-divider.js';
import '../../define/http/http-snippets.js';
/**
 * A web component that renders the documentation page for an API operation built from
 * the AMF graph model.
 *
 * @fires tryit
 */
export default class ApiOperationDocument extends ApiDocumentationBase {
    protected endpointValue?: IApiEndPoint;
    protected operationValue?: IApiOperation;
    protected serversValue?: IApiServer[];
    protected responsesValue?: IApiResponse[];
    protected serverIdValue?: string;
    protected baseUriValue?: string;
    protected urlValue?: string;
    protected versionValue?: string;
    protected protocolsValue?: string[];
    protected snippetsPayloadValue?: string;
    protected snippetsHeadersValue?: string;
    protected snippetsParametersValue?: string;
    /**
     * The id of the currently selected server to use to construct the URL.
     * If not set a first server in the API servers array is used.
     * @attribute
     */
    get serverId(): string | undefined;
    set serverId(value: string | undefined);
    /**
     * The computed list of servers.
     */
    get servers(): IApiServer[] | undefined;
    /**
     * The current server in use.
     */
    get server(): IApiServer | undefined;
    get operation(): IApiOperation | undefined;
    set operation(value: IApiOperation | undefined);
    get endpoint(): IApiEndPoint | undefined;
    set endpoint(value: IApiEndPoint | undefined);
    /**
     * A property to set to override AMF's model base URI information.
     * When this property is set, the `endpointUri` property is recalculated.
     * @attribute
     */
    get baseUri(): string | undefined;
    set baseUri(value: string | undefined);
    /**
     * The computed URI for the endpoint.
     */
    get endpointUri(): string | undefined;
    get snippetsUri(): string;
    /**
     * The computed list of responses for this operation.
     */
    get responses(): IApiResponse[] | undefined;
    /**
     * The API's protocols.
     */
    get protocols(): string[] | undefined;
    get version(): string | undefined;
    /**
     * The domain id of the currently selected security to render.
     * This is only used when a multiple security schemes are applied to the operation.
     * @attribute
     */
    accessor securityId: string | undefined;
    /**
     * When set it opens the response section
     * @attribute
     */
    accessor responsesOpened: boolean | undefined;
    /**
     * When set it opens the security section
     * @attribute
     */
    accessor securityOpened: boolean | undefined;
    /**
     * When set it opens the code snippets section
     * @attribute
     */
    accessor snippetsOpened: boolean | undefined;
    /**
     * The selected status code in the responses section.
     * @attribute
     */
    accessor selectedStatus: string | undefined;
    /**
     * Whether the callbacks section is opened.
     * @attribute
     */
    accessor callbacksOpened: boolean | undefined;
    /**
     * When set it renders the "try it" button that dispatches the `tryit` event.
     * @attribute
     */
    accessor tryItButton: boolean | undefined;
    /**
     * When set it renders the view optimised for asynchronous API operation.
     * @attribute
     */
    accessor asyncApi: boolean | undefined;
    /**
     * When set it renders code examples section is the documentation
     * @attribute
     */
    accessor renderCodeSnippets: boolean | undefined;
    /**
     * When set it renders security documentation when applicable
     * @attribute
     */
    accessor showSecurity: boolean | undefined;
    /**
     * The currently rendered request panel mime type.
     * @attribute
     */
    accessor requestMimeType: string | undefined;
    /**
     * Optional. The parent endpoint id. When set it uses this value to query for the endpoint
     * instead of querying for a parent through the operation id.
     * Also, when `endpoint` is set and the `endpointId` match then it ignores querying for
     * the endpoint.
     * @attribute
     */
    accessor endpointId: string | undefined;
    processGraph(): Promise<void>;
    /**
     * Queries the store for the operation data, when needed.
     */
    queryOperation(): Promise<void>;
    /**
     * Queries the store for the endpoint data.
     */
    queryEndpoint(): Promise<void>;
    /**
     * Queries for the current servers value.
     */
    queryServers(): Promise<void>;
    /**
     * Queries the API store for the API protocols list.
     */
    queryProtocols(): Promise<void>;
    /**
     * Queries the API store for the API version value.
     */
    queryVersion(): Promise<void>;
    /**
     * Queries for the responses data of the current operation.
     */
    queryResponses(): Promise<void>;
    /**
     * Updates the `selectedStatus` if not selected or the current selection doesn't
     * exists in the current list of responses.
     */
    protected preselectResponse(): void;
    /**
     * Updates the `securityId` if not selected or the current selection doesn't
     * exists in the current list of security.
     */
    protected preselectSecurity(): void;
    /**
     * Computes the URL value for the current serves, selected server, and endpoint's path.
     */
    protected computeUrlValue(): void;
    /**
     * Computes query parameters for the code snippets.
     */
    protected computeParametersValue(): void;
    /**
     * Computes payload value for the code snippets.
     */
    protected computeSnippetsPayload(): void;
    /**
     * Computes headers value for the code snippets.
     */
    protected computeSnippetsHeaders(): void;
    /**
     * A handler for the status code tab selection.
     */
    protected handleStatusCode(e: CustomEvent<TabSelectionDetail>): void;
    /**
     * A handler for the status code tab selection.
     */
    protected handleSecuritySelection(e: CustomEvent<TabSelectionDetail>): void;
    /**
     * A handler for the try it button click.
     * It dispatches the `tryit` custom event.
     */
    protected handleTryIt(): void;
    /**
     * A handler for the request panel mime type change.
     */
    protected handleRequestMimeChange(e: Event): void;
    render(): TemplateResult;
    /**
     * @returns The template for the Operation title.
     */
    protected renderTitle(operation: IApiOperation): TemplateResult;
    /**
     * @returns The template for the Operation traits.
     */
    protected renderTraits(operation: IApiOperation): TemplateResult | string;
    /**
     * @returns The template for the operation summary filed.
     */
    protected renderSummary(operation: IApiOperation): TemplateResult | string;
    /**
     * @returns The template for the Operation meta information.
     */
    protected renderMetaData(operation: IApiOperation): TemplateResult[] | string;
    /**
     * @returns The template for the deprecated message.
     */
    protected renderDeprecated(operation: IApiOperation): TemplateResult | string;
    /**
     * @returns The template for the operation's URL.
     */
    protected renderUrl(operation: IApiOperation): TemplateResult | string;
    /**
     * @returns The template for the operation's request documentation element.
     */
    protected renderRequestTemplate(): TemplateResult | string;
    protected renderCallbacks(operation: IApiOperation): TemplateResult | string;
    /**
     * @returns The template for the operation's request documentation element.
     */
    protected renderCallback(callback: IApiCallback): TemplateResult;
    protected renderResponse(): TemplateResult | string;
    /**
     * @param responses The responses to render.
     * @returns The template for the responses selector.
     */
    protected renderResponseTabs(responses: IApiResponse[]): TemplateResult | string;
    /**
     * @param responses The responses to render.
     * @returns The template for the currently selected response.
     */
    protected renderResponseContent(responses: IApiResponse[]): TemplateResult;
    /**
     * @returns The template for the security list section.
     */
    protected renderSecuritySection(operation: IApiOperation): TemplateResult | string;
    protected renderSecurity(security: IApiSecurityRequirement): TemplateResult;
    protected renderSecuritySelector(operation: IApiOperation): TemplateResult;
    protected renderSecurityTab(security: IApiSecurityRequirement): TemplateResult;
    /**
     * @returns The template for the "try it" button.
     */
    protected renderTryIt(): TemplateResult | typeof nothing;
    /**
     * @returns The template for the code snippets.
     */
    protected renderSnippets(operation: IApiOperation): TemplateResult | string;
}
//# sourceMappingURL=ApiOperationDocument.element.d.ts.map