import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
import { MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { TITLED_DIALOG_DATA } from '@anglr/common/material';
import { EditorModule } from '@tinymce/tinymce-angular';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@tinymce/tinymce-angular";
/**
 * Component used as dialog displaying rich text block editor
 */
export class RichTextBlockEditorDialogSAComponent {
    //######################### protected properties - children #########################
    //######################### constructor #########################
    constructor(data, dialog) {
        this.data = data;
        this.dialog = dialog;
        //######################### protected properties - template bindings #########################
        /**
         * Current content of editor
         */
        this.content = null;
        this.content = data;
    }
}
RichTextBlockEditorDialogSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RichTextBlockEditorDialogSAComponent, deps: [{ token: TITLED_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
RichTextBlockEditorDialogSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: RichTextBlockEditorDialogSAComponent, isStandalone: true, selector: "rich-text-block-editor-dialog", ngImport: i0, template: "<editor #editor [initialValue]=\"content ?? ''\"></editor>\n\n<div class=\"dynamic-flex-row dynamic-flex-end dynamic-action-buttons\">\n    <button type=\"button\" class=\"dynamic-btn dynamic-btn-info\" type=\"button\" [mat-dialog-close]=\"null\">\n        <span>cancel</span>\n    </button>\n\n    <button type=\"button\" class=\"dynamic-btn dynamic-btn-primary\" type=\"button\" (click)=\"content = editor.editor.getContent(); dialog.close(content)\">\n        <span>ok</span>\n    </button>\n</div>", dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: RichTextBlockEditorDialogSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'rich-text-block-editor-dialog', standalone: true, imports: [
                        MatDialogModule,
                        EditorModule,
                    ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<editor #editor [initialValue]=\"content ?? ''\"></editor>\n\n<div class=\"dynamic-flex-row dynamic-flex-end dynamic-action-buttons\">\n    <button type=\"button\" class=\"dynamic-btn dynamic-btn-info\" type=\"button\" [mat-dialog-close]=\"null\">\n        <span>cancel</span>\n    </button>\n\n    <button type=\"button\" class=\"dynamic-btn dynamic-btn-primary\" type=\"button\" (click)=\"content = editor.editor.getContent(); dialog.close(content)\">\n        <span>ok</span>\n    </button>\n</div>" }]
        }], ctorParameters: () => [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [TITLED_DIALOG_DATA]
                }] }, { type: i1.MatDialogRef }] });
//# sourceMappingURL=richTextBlockEditorDialog.component.js.map