import { TemplateResult } from 'lit';
import { ApiDefinitions } from '@api-client/core/build/browser.js';
import { ApiDocumentationBase } from './ApiDocumentationBase.js';
import { ServerChangeEvent, ServerCountChangeEvent } from '../../events/amf/ServerEvents.js';
import { ApiNavigationEvent } from '../../events/amf/NavigationEvents.js';
import { SelectionType, DocumentMeta } from '../../amf/types.js';
import { Oauth2Credentials } from '../authorization/types.js';
import '../../define/amf/api-summary.js';
import '../../define/amf/api-operation-document.js';
import '../../define/amf/api-resource-document.js';
import '../../define/amf/api-security-document.js';
import '../../define/amf/api-documentation-document.js';
import '../../define/amf/api-schema-document.js';
import '../../define/amf/api-server-picker.js';
import '../../define/ui/ui-radio.js';
/**
 * A main documentation view for an AMF model representing a sync or an async API.
 *
 * This element works with the [AMF](https://github.com/mulesoft/amf) data model.
 */
export default class ApiDocumentation extends ApiDocumentationBase {
    protected domainTypeValue: SelectionType | undefined;
    protected operationIdValue: string | undefined;
    protected handleNavigationEventsValue: boolean | undefined;
    protected renderedViewValue: string | undefined;
    protected apiSummaryValue?: ApiDefinitions.IApiSummary;
    protected documentMetaValue?: DocumentMeta;
    protected navEventsRegistered: boolean;
    /**
     * A property to set to override AMF's model base URI information.
     * @attribute
     */
    baseUri?: string;
    /**
     * When set it renders the "try it" button that dispatches the `tryit` event.
     * @attribute
     */
    tryItButton?: boolean;
    /**
     * When set it renders the "try it" panel next to the operation documentation.
     * Setting this automatically disables the `tryItButton` property.
     *
     * Note, use this only when there's enough space on the screen to render 2 panels side-by-side.
     * @attribute
     */
    tryItPanel?: boolean;
    /**
     * OAuth2 redirect URI.
     * This value **must** be set in order for OAuth 1/2 to work properly.
     * This is only required in inline mode (`inlineMethods`).
     * @attribute
     */
    redirectUri?: string;
    /**
     * When set it renders the URL input above the URL parameters in the HTTP editor.
     * @attribute
     */
    httpUrlEditor?: boolean;
    /**
     * When set it applies the authorization values to the request dispatched
     * with the API request event.
     * If possible, it applies the authorization values to query parameter or headers
     * depending on the configuration.
     *
     * When the values arr applied to the request the authorization config is kept in the
     * request object, but its `enabled` state is always `false`, meaning other potential
     * processors should ignore this values.
     *
     * If this property is not set then the application hosting this component should
     * process the authorization data and apply them to the request.
     * @attribute
     */
    httpApplyAuthorization?: boolean;
    /**
     * List of credentials source passed to the HTTP editor
     */
    httpCredentialsSource?: Oauth2Credentials[];
    /**
     * Optional property to set on the request editor.
     * When true, the server selector is not rendered
     * @attribute
     */
    noServerSelector?: boolean;
    /**
     * When set it renders "add custom" item button in the HTTP request editor.
     * If the element is to be used without AMF model this should always
     * be enabled. Otherwise users won't be able to add a parameter.
     * @attribute
     */
    httpAllowCustom?: boolean;
    /**
     * Optional property to set on the request editor.
     * If true, the server selector custom base URI option is rendered
     * @attribute
     */
    allowCustomBaseUri?: boolean;
    /**
     * The URI of the server currently selected in the server selector
     * @attribute
     */
    serverValue?: string;
    /**
     * The type of the server currently selected in the server selector
     * @attribute
     */
    serverType?: string;
    /**
     * The mime type of the currently selected schema.
     * @attribute
     */
    schemaMimeType?: string;
    serversCount?: number;
    /**
     * The type of the selected domain item.
     * @attribute
     */
    get domainType(): SelectionType | undefined;
    set domainType(value: SelectionType | undefined);
    /**
     * The domain id of the currently rendered API operation.
     * When selecting an operation the `domainId` is the id if the parent endpoint.
     * @attribute
     */
    get operationId(): string | undefined;
    set operationId(value: string | undefined);
    /**
     * By default application hosting the element must set `domainId` and
     * `domainType` properties. When using `api-navigation` element
     * by setting this property the element listens for navigation events
     * and updates the state
     * @attribute
     */
    get handleNavigationEvents(): boolean | undefined;
    set handleNavigationEvents(value: boolean | undefined);
    /**
     * Former `effectiveBaseUri`.
     * @returns The URI for the API defined by the `baseUri` property or the `serverValue`.
     */
    get apiBaseUri(): string | undefined;
    /**
     * @deprecated Use `apiBaseUri` instead.
     */
    get effectiveBaseUri(): string | undefined;
    /** The domain type of the rendered view. */
    get renderedView(): string | undefined;
    get renderSelector(): boolean;
    /**
     * This is a computed value from the AMF model.
     * @returns true when whe currently loaded API is an async API.
     */
    get isAsync(): boolean;
    /**
     * @returns The mime type of the schema that is being rendered.
     */
    get schemaMime(): string | undefined;
    get documentMeta(): DocumentMeta | undefined;
    constructor();
    connectedCallback(): void;
    disconnectedCallback(): void;
    /**
     * Registers the api navigation event listener handler
     * on the window object.
     */
    protected registerNavigationEvents(): void;
    /**
     * Removes event listener from window object for the API navigation event.
     */
    protected unregisterNavigationEvents(): void;
    /**
     * Handler for the API navigation event.
     *
     * Note, when the current type is set to `operation` then the `operationId` is
     * set instead of `domainId`, which is set to the parent endpoint id.
     */
    protected navigationHandler(e: ApiNavigationEvent): void;
    processGraph(): Promise<void>;
    /**
     * Reads the currently loaded document meta data from the store.
     */
    queryDocumentMeta(): Promise<void>;
    /**
     * Reads the API summary.
     * Called only when the currently loaded document is an API.
     */
    queryApiSummary(): Promise<void>;
    /**
     * Processes selection for the web API data model. It ignores the input if
     * `domainId` or `domainType` is not set.
     */
    protected processApiSpecSelection(): void;
    /**
     * Processes selection for a library data model. It ignores the input if
     * `domainId` or `domainType` is not set.
     */
    protected processLibrarySelection(): void;
    /**
     * Processes fragment model and sets current selection and the model.
     *
     * @param domainType The selected domain type.
     */
    protected processFragment(domainType?: SelectionType): void;
    /**
     * Sets the partial model to be rendered.
     *
     * @param domainType The domain type representing the partial model.
     */
    protected processPartial(domainType?: SelectionType): void;
    /**
     * Processes endpoint data from partial model definition.
     * It sets models that are used by the docs.
     *
     * If `selected` or `selectedType` is not set then it automatically selects
     */
    protected processEndpointPartial(): void;
    protected serversCountHandler(e: ServerCountChangeEvent): void;
    protected serverChangeHandler(e: ServerChangeEvent): void;
    protected mediaTypeSelectHandler(e: Event): void;
    render(): TemplateResult;
    /**
     * @returns The template for the server selector.
     */
    protected serverSelectorTemplate(): TemplateResult | string;
    /**
     * @returns The template for the server selector.
     */
    protected modelTemplate(): TemplateResult | string;
    /**
     * @returns The template for the API summary page.
     */
    protected summaryTemplate(): TemplateResult | string;
    /**
     * @returns The template for the API security definition page.
     */
    protected securityTemplate(): TemplateResult | string;
    /**
     * @returns The template for the RAML's documentation page.
     */
    protected documentationTemplate(): TemplateResult | string;
    /**
     * @returns The template for the API schema page.
     */
    protected schemaTemplate(): TemplateResult | string;
    /**
     * @returns The template for the API endpoint page.
     */
    protected resourceTemplate(): TemplateResult | string;
    /**
     * This is a part of schema rendering.
     * When the current API defines the media types then this shows the selector
     * to render examples with a specific mime.
     */
    protected schemaMediaSelectorTemplate(): TemplateResult | string;
}
//# sourceMappingURL=ApiDocumentation.element.d.ts.map