import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { ValueView } from '../../value-view';
import * as i0 from "@angular/core";
import * as i1 from "@angular/platform-browser";
import * as i2 from "../../value-view-label.component";
export class RichTextValueViewComponent extends ValueView {
    constructor(_domSanitizer, _changeDetector) {
        super();
        this._domSanitizer = _domSanitizer;
        this._changeDetector = _changeDetector;
        this.snow = true;
    }
    ngOnChanges(changes) {
        if (changes.value) {
            this.safeHtml = this._domSanitizer.bypassSecurityTrustHtml(this.value || '');
            this._changeDetector.markForCheck();
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RichTextValueViewComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RichTextValueViewComponent, selector: "ax-rich-text-value-view", host: { properties: { "class.ql-snow": "this.snow" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ax-value-view-label [label]=\"label\">\n  <span class=\"ql-editor\" [innerHTML]=\"safeHtml\"></span>\n</ax-value-view-label>\n", styles: [":host ::ng-deep .ql-editor .ax-quill-template-variable{display:inline-block;background-color:transparent;border-bottom:2px solid var(--primary-color-500);border-radius:6px;padding:1px 6px;cursor:pointer}:host ::ng-deep .ql-editor .ax-quill-template-variable:hover{background-color:var(--primary-color-100)}:host ::ng-deep .ql-editor .ax-quill-template-variable.invalid{color:var(--warn-color-300);border-bottom:2px solid var(--warn-color-300)}:host ::ng-deep .ql-editor .ax-quill-template-variable.is-disabled{cursor:default;pointer-events:none;border-bottom:2px solid #bdc3c9}:host ::ng-deep .ql-editor .ax-quill-template-variable.is-disabled:hover{background-color:transparent}.ql-editor{text-align:left;padding:0;-webkit-hyphens:auto;hyphens:auto}@page{margin:1in}\n", ":host{display:grid;grid-template-rows:auto auto;align-items:center;font-weight:400;max-width:100%;width:100%;margin-bottom:.25rem}\n"], dependencies: [{ kind: "component", type: i2.ValueViewLabelComponent, selector: "ax-value-view-label", inputs: ["label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RichTextValueViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-rich-text-value-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-value-view-label [label]=\"label\">\n  <span class=\"ql-editor\" [innerHTML]=\"safeHtml\"></span>\n</ax-value-view-label>\n", styles: [":host ::ng-deep .ql-editor .ax-quill-template-variable{display:inline-block;background-color:transparent;border-bottom:2px solid var(--primary-color-500);border-radius:6px;padding:1px 6px;cursor:pointer}:host ::ng-deep .ql-editor .ax-quill-template-variable:hover{background-color:var(--primary-color-100)}:host ::ng-deep .ql-editor .ax-quill-template-variable.invalid{color:var(--warn-color-300);border-bottom:2px solid var(--warn-color-300)}:host ::ng-deep .ql-editor .ax-quill-template-variable.is-disabled{cursor:default;pointer-events:none;border-bottom:2px solid #bdc3c9}:host ::ng-deep .ql-editor .ax-quill-template-variable.is-disabled:hover{background-color:transparent}.ql-editor{text-align:left;padding:0;-webkit-hyphens:auto;hyphens:auto}@page{margin:1in}\n", ":host{display:grid;grid-template-rows:auto auto;align-items:center;font-weight:400;max-width:100%;width:100%;margin-bottom:.25rem}\n"] }]
        }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }], propDecorators: { snow: [{
                type: HostBinding,
                args: ['class.ql-snow']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmljaC10ZXh0LXZhbHVlLXZpZXcuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnR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