import Component from '../component.js';
import DivComponent from '../div.js';
import QuillEditor from '../quill-editor.js';
import CoEuiEditorHtmlView from './eui-editor-html-view.js';
import CoEuiEditorJsonView from './eui-editor-json-view.js';

export default class CoEuiEditor extends Component {
    constructor(parent) {
        let selector = 'eui-editor';
        super(parent, selector);
        //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/externals/eui-editor/eui-editor.component.html
    }

    get euiEditorWrapperDivCO() {
        return new DivComponent(this.currentPath).addPredicateClassContains('eui-editor-wrapper');
    }

    get quillEditorCO() {
        return new QuillEditor(this.euiEditorWrapperDivCO);
    }

    // TO DO - when needed 

    get euiEditorReadOnlyDivCO() {
        return new DivComponent(this.currentPath).addPredicateClassContains('eui-editor--readonly');
    }

    get htmlViewCO() {
        return new CoEuiEditorHtmlView(this.euiEditorReadOnlyDivCO);
    }

    get jsonViewCO() {
        return new CoEuiEditorJsonView(this.euiEditorReadOnlyDivCO);
    }
}


