/**
 * @license
 * Copyright 2018 JBoss Inc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Oas20SchemaDefinition, Oas30SchemaDefinition, Aai20SchemaDefinition } from "apicurio-data-models";
import { EntityEditor, EntityEditorEvent, IEntityEditorHandler } from "./entity-editor.component";
import { CodeEditorMode, CodeEditorTheme } from "../../../../../../components/common/code-editor.component";
export interface DataTypeData {
    name: string;
    description: string;
    example: string;
    template: string;
}
export interface DataTypeEditorEvent extends EntityEditorEvent<Oas20SchemaDefinition | Oas30SchemaDefinition | Aai20SchemaDefinition> {
    data: DataTypeData;
}
export interface IDataTypeEditorHandler extends IEntityEditorHandler<Oas20SchemaDefinition | Oas30SchemaDefinition | Aai20SchemaDefinition, DataTypeEditorEvent> {
    onSave(event: DataTypeEditorEvent): void;
    onCancel(event: DataTypeEditorEvent): void;
}
export declare class DataTypeEditorComponent extends EntityEditor<Oas20SchemaDefinition | Oas30SchemaDefinition | Aai20SchemaDefinition, DataTypeEditorEvent> {
    protected exampleValid: boolean;
    protected exampleFormattable: boolean;
    defs: string[];
    defExists: boolean;
    model: DataTypeData;
    doAfterOpen(): void;
    /**
     * Initializes the editor's data model from a provided entity (initialize the editor data model from an entity).
     * @param entity
     */
    initializeModelFromEntity(entity: Oas20SchemaDefinition | Oas30SchemaDefinition): void;
    /**
     * Initializes the editor's data model to an empty state.
     */
    initializeModel(): void;
    /**
     * Returns true if the data model is valid.
     */
    isValid(): boolean;
    /**
     * Creates an entity event specific to this entity editor.
     */
    entityEvent(): DataTypeEditorEvent;
    get example(): string;
    set example(definition: string);
    /**
     * Returns true if it's possible to format the example definition (it must be non-null and
     * syntactically valid).
     * @return
     */
    isExampleDefinitionFormattable(): boolean;
    /**
     * Returns true if the example definition added by the user in the Add Definition modal
     * dialog is valid (syntactically).
     * @return
     */
    isExampleDefinitionValid(): boolean;
    /**
     * Called to format the example definition.
     */
    formatExampleDefinition(): void;
    exampleEditorTheme(): CodeEditorTheme;
    exampleEditorMode(): CodeEditorMode;
    private getDefinitions;
    private getAaiDefinitions;
}
