/**
 * Returns the base name of a node type, stripping known variant suffixes.
 */
const variantToBaseNameMap = {
  panel_c1: 'panel'
};
export function getBaseNodeTypeName(nodeType) {
  var _variantToBaseNameMap;
  return (_variantToBaseNameMap = variantToBaseNameMap[nodeType.name]) !== null && _variantToBaseNameMap !== void 0 ? _variantToBaseNameMap : nodeType.name;
}

/**
 * Returns true if two node types share the same base type name.
 *
 * Useful for comparing nodes that may exist as schema variants
 * (e.g. `panel` and `panel_c1` are considered the same base type).
 */
export function isNodeOfSameBaseType(a, b) {
  return getBaseNodeTypeName(a) === getBaseNodeTypeName(b);
}