#!/usr/bin/env node
import {
  typedKeys
} from "./chunk-T4EXUIBY.js";
import {
  init_esm_shims
} from "./chunk-DHET7RCE.js";

// src/cli/components/wizard/utils.ts
init_esm_shims();
import { unique } from "remeda";
function getDomainDisplayName(domain) {
  const displayNames = {
    web: "Web",
    api: "API",
    cli: "CLI",
    mobile: "Mobile",
    shared: "Shared"
  };
  return displayNames[domain];
}
function getStackName(stackId, matrix) {
  if (!stackId) return void 0;
  const stack = matrix.suggestedStacks.find((s) => s.id === stackId);
  return stack?.name;
}
function getDomainsFromStack(stack, categories) {
  const subcategories = Object.values(stack.skills).flatMap(
    (config) => config ? typedKeys(config) : []
  );
  return unique(
    subcategories.flatMap((sub) => {
      const d = categories[sub]?.domain;
      return d ? [d] : [];
    })
  ).sort();
}

export {
  getDomainDisplayName,
  getStackName,
  getDomainsFromStack
};
//# sourceMappingURL=chunk-YRVTXSXP.js.map