import { Component, Inject } from '@angular/core';
import { CANVASDEFAULT } from '../../model/attributeInfo';
import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import { DOCUMENT } from '@angular/common';
import { BaseControl } from '../basecontrol';
import * as i0 from "@angular/core";
import * as i1 from "../../service/common.service";
import * as i2 from "../form-box/form-box.component";
import * as i3 from "ng-devui";
import * as i4 from "@ckeditor/ckeditor5-angular";
import * as i5 from "@angular/common";
import * as i6 from "@angular/forms";
export class FormRichinputComponent extends BaseControl {
    constructor(commonService, document) {
        super(commonService);
        this.commonService = commonService;
        this.document = document;
        this.editor = ClassicEditor;
        this.canvasInfo = CANVASDEFAULT;
    }
    ngOnInit() {
        this.commonService.changeFormLayout.subscribe(o => {
            this.canvasInfo = o;
        });
    }
}
FormRichinputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormRichinputComponent, deps: [{ token: i1.CommonService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
FormRichinputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.6", type: FormRichinputComponent, selector: "form-richinput", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data.mode=='op'; else detail\">\r\n  <form-box #box [mainCarry]=\"detail\" [name]=\"data.name\" [controltype]=\"data.controltype\" (controlclick)=\"onClick($event)\"></form-box>\r\n</ng-container>\r\n<ng-template #detail>\r\n    <d-form-item>\r\n        <d-form-label [required]=\"data.required\" [hasHelp]=\"data.help\" [helpTips]=\"data.helptip||''\">{{data.label}}</d-form-label>\r\n        <d-form-control style=\"flex: 1;\" [ngStyle]=\"{'width':canvasInfo.layout=='horizontal'?'0px':'100%'}\">\r\n          <div class=\"mianrichinput\">\r\n            <ckeditor [editor]=\"editor\" [(ngModel)]=\"data.defaultvalue\"></ckeditor>\r\n          </div>\r\n        </d-form-control>\r\n      </d-form-item>\r\n</ng-template>", styles: [":host ::ng-deep .ck-editor__editable_inline{height:200px!important}\n"], components: [{ type: i2.FormBoxComponent, selector: "form-box", inputs: ["mainCarry", "name", "controltype", "additionalcss"], outputs: ["controlclick"] }, { type: i3.FormItemComponent, selector: "d-form-item", inputs: ["dFeedbackType", "dHasFeedback"] }, { type: i3.FormLabelComponent, selector: "d-form-label", inputs: ["required", "hasHelp", "helpTips"] }, { type: i3.FormControlComponent, selector: "d-form-control", inputs: ["extraInfo", "feedbackStatus", "suffixTemplate"] }, { type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["config", "data", "tagName", "disabled", "editor", "watchdog"], outputs: ["ready", "change", "blur", "focus", "error"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.6", ngImport: i0, type: FormRichinputComponent, decorators: [{
            type: Component,
            args: [{ selector: 'form-richinput', template: "<ng-container *ngIf=\"data.mode=='op'; else detail\">\r\n  <form-box #box [mainCarry]=\"detail\" [name]=\"data.name\" [controltype]=\"data.controltype\" (controlclick)=\"onClick($event)\"></form-box>\r\n</ng-container>\r\n<ng-template #detail>\r\n    <d-form-item>\r\n        <d-form-label [required]=\"data.required\" [hasHelp]=\"data.help\" [helpTips]=\"data.helptip||''\">{{data.label}}</d-form-label>\r\n        <d-form-control style=\"flex: 1;\" [ngStyle]=\"{'width':canvasInfo.layout=='horizontal'?'0px':'100%'}\">\r\n          <div class=\"mianrichinput\">\r\n            <ckeditor [editor]=\"editor\" [(ngModel)]=\"data.defaultvalue\"></ckeditor>\r\n          </div>\r\n        </d-form-control>\r\n      </d-form-item>\r\n</ng-template>", styles: [":host ::ng-deep .ck-editor__editable_inline{height:200px!important}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.CommonService }, { type: Document, decorators: [{
                    type: Inject,
                    args: [DOCUMENT]
                }] }]; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1yaWNoaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZm9ybWJ1aWxkZXIvc3JjL2xpYi9jb250cm9sL2Zvcm0tcmljaGlucHV0L2Zvcm0tcmljaGlucHV0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm1idWlsZGVyL3NyYy9saWIvY29udHJvbC9mb3JtLXJpY2hpbnB1dC9mb3JtLXJpY2hpbnB1dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBNEIsTUFBTSxlQUFlLENBQUM7QUFDNUUsT0FBTyxFQUFpQixhQUFhLEVBQWMsTUFBTSwyQkFBMkIsQ0FBQztBQUdyRixPQUFPLEtBQUssYUFBYSxNQUFNLG1DQUFtQyxDQUFDO0FBQ25FLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMzQyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7Ozs7Ozs7O0FBTzdDLE1BQU0sT0FBTyxzQkFBdUIsU0FBUSxXQUFXO0lBS3JELFlBQ1UsYUFBMkIsRUFDQSxRQUFrQjtRQUVyRCxLQUFLLENBQUMsYUFBYSxDQUFDLENBQUE7UUFIWixrQkFBYSxHQUFiLGFBQWEsQ0FBYztRQUNBLGFBQVEsR0FBUixRQUFRLENBQVU7UUFMdkQsV0FBTSxH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