"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const ModelUtil = require("./ModelUtil.js");
function isExpanded(element, di) {
  if (ModelUtil.is(element, "bpmn:CallActivity")) {
    return false;
  }
  if (ModelUtil.is(element, "bpmn:SubProcess")) {
    di = di || ModelUtil.getDi(element);
    if (di && ModelUtil.is(di, "bpmndi:BPMNPlane")) {
      return true;
    }
    return di && !!di.isExpanded;
  }
  if (ModelUtil.is(element, "bpmn:Participant")) {
    return !!ModelUtil.getBusinessObject(element).processRef;
  }
  return true;
}
function isEventSubProcess(element) {
  return element && !!ModelUtil.getBusinessObject(element).triggeredByEvent;
}
exports.isEventSubProcess = isEventSubProcess;
exports.isExpanded = isExpanded;
