#!/usr/bin/env node
import {
  BUILT_IN_DOMAIN_ORDER
} from "./chunk-6OWHQ7HM.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 (domain in displayNames ? displayNames[domain] : null) ?? domain.charAt(0).toUpperCase() + domain.slice(1);
}
function getStackName(stackId, matrix) {
  if (!stackId) return void 0;
  const stack = matrix.suggestedStacks.find((s) => s.id === stackId);
  return stack?.name;
}
function orderDomains(domains) {
  const builtIn = BUILT_IN_DOMAIN_ORDER.filter((d) => domains.includes(d));
  const custom = domains.filter((d) => !BUILT_IN_DOMAIN_ORDER.includes(d)).sort();
  return [...custom, ...builtIn];
}

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