import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { CodeEditorMode } from './code-editor-modes';
import { CodeEditorTheme } from './code-editor-themes';
import * as i0 from "@angular/core";
import * as i1 from "ng2-ace-editor";
export class CodeEditorComponent {
    constructor() {
        this.editorTitle = 'Code Editor';
        this.mode = CodeEditorMode.YAML;
        this.theme = CodeEditorTheme.ECLIPSE;
        this.readonly = false;
        this.autoUpdateContent = true;
        this.durationBeforeCallback = 0;
        this.textChanged = new EventEmitter();
    }
    ngOnInit() {
    }
}
CodeEditorComponent.ɵfac = function CodeEditorComponent_Factory(t) { return new (t || CodeEditorComponent)(); };
CodeEditorComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CodeEditorComponent, selectors: [["lib-code-editor"]], inputs: { text: "text", editorTitle: "editorTitle", mode: "mode", theme: "theme", options: "options", readonly: "readonly", autoUpdateContent: "autoUpdateContent", durationBeforeCallback: "durationBeforeCallback" }, outputs: { textChanged: "textChanged" }, decls: 6, vars: 7, consts: [[1, "flex", "flex-col", "h-full", "pb-6"], [1, "axo-font", "text-base", "code-editor-header"], [1, "h-full"], [1, "h-full", "h-min-30", 3, "text", "theme", "options", "readOnly", "autoUpdateContent", "durationBeforeCallback", "textChange", "textChanged"], [1, "axo-font", "text-base", "code-editor-footer"]], template: function CodeEditorComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtext(2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 2);
        i0.ɵɵelementStart(4, "ace-editor", 3);
        i0.ɵɵlistener("textChange", function CodeEditorComponent_Template_ace_editor_textChange_4_listener($event) { return ctx.text = $event; })("textChanged", function CodeEditorComponent_Template_ace_editor_textChanged_4_listener($event) { return ctx.textChanged.emit($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelement(5, "div", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(ctx.editorTitle);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("text", ctx.text)("theme", ctx.theme)("options", ctx.options)("readOnly", ctx.readonly)("autoUpdateContent", ctx.autoUpdateContent)("durationBeforeCallback", ctx.durationBeforeCallback);
    } }, directives: [i1.AceEditorComponent], styles: ["lib-code-editor{display:block;height:100%;z-index:100}lib-code-editor .ace-tm .ace_print-margin{width:1px;background:transparent}lib-code-editor .ace_editor{border:1px solid #e2e8f0}lib-code-editor .code-editor-header{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;background-color:#f0f0f0;padding:0 12px;border-top:1px solid #e2e8f0;height:36px;line-height:36px}lib-code-editor .code-editor-footer{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;background-color:#f0f0f0;padding:0 12px;border-bottom:1px solid #e2e8f0;height:30px;line-height:30px}\n"], encapsulation: 2 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CodeEditorComponent, [{
        type: Component,
        args: [{ selector: 'lib-code-editor', encapsulation: ViewEncapsulation.None, template: "<!-- Ace editor selector  -->\n<div class=\"flex flex-col h-full pb-6\">\n    <div class=\"axo-font text-base code-editor-header\">{{editorTitle}}</div>\n    <div class=\"h-full\">\n        <ace-editor [(text)]=\"text\" [theme]=\"theme\" [options]=\"options\" [readOnly]=\"readonly\"\n        [autoUpdateContent]=\"autoUpdateContent\" [durationBeforeCallback]=\"durationBeforeCallback\"\n        (textChanged)=\"textChanged.emit($event)\" class=\"h-full h-min-30\">\n    </ace-editor>\n    </div>\n    <div class=\"axo-font text-base code-editor-footer\"></div>\n</div>\n", styles: ["lib-code-editor{display:block;height:100%;z-index:100}lib-code-editor .ace-tm .ace_print-margin{width:1px;background:transparent}lib-code-editor .ace_editor{border:1px solid #e2e8f0}lib-code-editor .code-editor-header{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;background-color:#f0f0f0;padding:0 12px;border-top:1px solid #e2e8f0;height:36px;line-height:36px}lib-code-editor .code-editor-footer{border-left:1px solid #e2e8f0;border-right:1px solid #e2e8f0;background-color:#f0f0f0;padding:0 12px;border-bottom:1px solid #e2e8f0;height:30px;line-height:30px}\n"] }]
    }], function () { return []; }, { text: [{
            type: Input
        }], editorTitle: [{
            type: Input
        }], mode: [{
            type: Input
        }], theme: [{
            type: Input
        }], options: [{
            type: Input
        }], readonly: [{
            type: Input
        }], autoUpdateContent: [{
            type: Input
        }], durationBeforeCallback: [{
            type: Input
        }], textChanged: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZS1lZGl0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2F4LWNvbW1vbi11aS1saWIvc3JjL2xpYi9jb2RlLWVkaXRvci9jb2RlLWVkaXRvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9zcmMvYXgtY29tbW9uLXVpLWxpYi9zcmMvbGliL2NvZGUtZWRpdG9yL2NvZGUtZWRpdG9yLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbEcsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQzs7O0FBU3ZELE1BQU0sT0FBTyxtQkFBbUI7SUFXOUI7UUFSUyxnQkFBVyxHQUFVLGFBQWEsQ0FBQTtRQUNsQyxTQUFJLEdBQWtCLGNBQWMsQ0FBQyxJQUFJLENBQUM7UUFDMUM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