import { some as G, every as T } from "../../../min-dash/dist/index.esm.mjs";
import { getDi as f } from "../util/ModelUtil.mjs";
import { componentsToPath as c } from "../../../diagram-js/lib/util/RenderUtil.mjs";
var m = "hsl(225, 10%, 15%)";
function x(t, n, i) {
  function c2(o, l) {
    return T(l, function(e, h) {
      return o[h] == e;
    });
  }
  return G(t.eventDefinitions, function(o) {
    return o.$type === n && c2(t, i);
  });
}
function P(t) {
  return t.$type === "bpmn:IntermediateThrowEvent" || t.$type === "bpmn:EndEvent";
}
function C(t) {
  var n = t.dataObjectRef;
  return t.isCollection || n && n.isCollection;
}
function E(t) {
  return t.businessObject;
}
function k(t, n) {
  var i = f(t);
  return i.get("color:background-color") || i.get("bioc:fill") || n || "white";
}
function u(t, n) {
  var i = f(t);
  return i.get("color:border-color") || i.get("bioc:stroke") || n || m;
}
function z(t, n, i) {
  var c2 = f(t), o = c2.get("label");
  return o && o.get("color:color") || n || u(t, i);
}
function M(t) {
  var n = t.x + t.width / 2, i = t.y + t.height / 2, c$1 = t.width / 2, o = [
    ["M", n, i],
    ["m", 0, -c$1],
    ["a", c$1, c$1, 0, 1, 1, 0, 2 * c$1],
    ["a", c$1, c$1, 0, 1, 1, 0, -2 * c$1],
    ["z"]
  ];
  return c(o);
}
function T$1(t, n) {
  var i = t.x, c$1 = t.y, o = t.width, l = t.height, e = [
    ["M", i + n, c$1],
    ["l", o - n * 2, 0],
    ["a", n, n, 0, 0, 1, n, n],
    ["l", 0, l - n * 2],
    ["a", n, n, 0, 0, 1, -n, n],
    ["l", n * 2 - o, 0],
    ["a", n, n, 0, 0, 1, -n, -n],
    ["l", 0, n * 2 - l],
    ["a", n, n, 0, 0, 1, n, -n],
    ["z"]
  ];
  return c(e);
}
function j(t) {
  var n = t.width, i = t.height, c$1 = t.x, o = t.y, l = n / 2, e = i / 2, h = [
    ["M", c$1 + l, o],
    ["l", l, e],
    ["l", -l, e],
    ["l", -l, -e],
    ["z"]
  ];
  return c(h);
}
function D(t) {
  var n = t.x, i = t.y, c$1 = t.width, o = t.height, l = [
    ["M", n, i],
    ["l", c$1, 0],
    ["l", 0, o],
    ["l", -c$1, 0],
    ["z"]
  ];
  return c(l);
}
export {
  m as black,
  M as getCirclePath,
  f as getDi,
  j as getDiamondPath,
  k as getFillColor,
  z as getLabelColor,
  D as getRectPath,
  T$1 as getRoundRectPath,
  E as getSemantic,
  u as getStrokeColor,
  C as isCollection,
  P as isThrowEvent,
  x as isTypedEvent
};
