import { is as u$1 } from "../../util/ModelUtil.mjs";
function u(e) {
  if (u$1(e, "bpmn:FlowElement") || u$1(e, "bpmn:Participant") || u$1(e, "bpmn:Lane") || u$1(e, "bpmn:SequenceFlow") || u$1(e, "bpmn:MessageFlow") || u$1(e, "bpmn:DataInput") || u$1(e, "bpmn:DataOutput"))
    return "name";
  if (u$1(e, "bpmn:TextAnnotation"))
    return "text";
  if (u$1(e, "bpmn:Group"))
    return "categoryValueRef";
}
function a(e) {
  var r = e.categoryValueRef;
  return r && r.value || "";
}
function p(e) {
  var r = e.businessObject, n = u(r);
  if (n)
    return n === "categoryValueRef" ? a(r) : r[n] || "";
}
export {
  p as getLabel
};
