import * as constant from './qmsCKEditorConstant';

export function fullscreenNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_FULLSCREEN_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function templateNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_TEMPLATE_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function toggleToolbarNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_TOGGLE_TOOLBAR_MSG,
            value
        },
        '*'
    );
}

export function loadTemplateNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_LOAD_TEMPLATE_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function linkNotify(value){
    window.postMessage(
        {
            eventName: constant.QMSCK_LINK_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function tooltipNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_TOOLTIP_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function imageMapNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_IMAGEMAP_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function bpmnNotify(value) {
  window.postMessage(
      {
          eventName: constant.QMSCK_BPMN_PLUGIN_MSG,
          value
      },
      '*'
  );
}

export function flowchartNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_FLOWCHART_PLUGIN_MSG,
            value
        },
        '*'
    );
}

export function uploadVideoNotify(value) {
    window.postMessage(
        {
            eventName: constant.QMSCK_BROWSE_VIDEO_MSG,
            value
        },
        '*'
    );
}

export function aboutCKEditorNotify(value) {
  window.postMessage(
      {
          eventName: constant.QMSCK_ABOUT_CKEDITOR_PLUGIN_MSG,
          value
      },
      '*'
  );
}
