import { STARTER_KITS } from "./registry";

/** High-level product shape — drives starter kit ordering + AI context in sourceData. */
export type ProductCategoryId =
  | "saas-tool"
  | "marketplace"
  | "mobile-app"
  | "website"
  | "other";

export const PRODUCT_CATEGORIES: {
  id: ProductCategoryId;
  label: string;
  hint: string;
}[] = [
  {
    id: "saas-tool",
    label: "SaaS tool",
    hint: "Subscriptions, dashboards, workspaces",
  },
  {
    id: "marketplace",
    label: "Marketplace",
    hint: "Listings, buyers & sellers, discovery",
  },
  {
    id: "mobile-app",
    label: "Mobile app",
    hint: "Touch-first, responsive shells",
  },
  {
    id: "website",
    label: "Website",
    hint: "Marketing, content, landing flows",
  },
  {
    id: "other",
    label: "Other",
    hint: "Full starter palette",
  },
];

/** Starter kit ids surfaced per category (ordered). Always includes shadcn / MUI / HeroUI where relevant. */
const CATEGORY_KIT_IDS: Record<ProductCategoryId, string[]> = {
  "saas-tool": ["shadcn-neutral", "mui-material", "heroui-next", "twenty-crm", "untitled-ui"],
  marketplace: ["shadcn-neutral", "heroui-next", "mui-material", "untitled-ui", "warm-minimal"],
  "mobile-app": ["heroui-next", "shadcn-neutral", "mui-material", "fresh-modern", "warm-minimal"],
  website: ["warm-minimal", "shadcn-neutral", "heroui-next", "bold-confident", "fresh-modern"],
  other: STARTER_KITS.map((k) => k.id),
};

export function kitsOrderedForCategory(category: ProductCategoryId): string[] {
  return CATEGORY_KIT_IDS[category];
}
