import * as Components from "./components/index.js";
// Type guard for ExternalComponent
export function isExternalComponent(component) {
  return typeof component.dispatcher === 'function';
}

// External components are guaranteed to have a dispatcher method

/**
 * Returns internal and external components from a componentMap, regardless of error state.
 * @returns An object containing internalComponents and externalComponents arrays
 */
export function getComponentsByType() {
  const internalComponents = new Map();
  const externalComponents = new Map();
  const componentMap = new Map(Object.entries(Components));
  for (const [name, component] of componentMap.entries()) {
    if (isExternalComponent(component)) {
      externalComponents.set(name, component);
    } else {
      internalComponents.set(name, component);
    }
  }
  return {
    internalComponents,
    externalComponents
  };
}
//# sourceMappingURL=validationHelpers.js.map