import path from "node:path";
import { PACKAGE_ROOT } from "./util";

const SCHEMAS_ROOT = path.join(PACKAGE_ROOT, "schemas");

export const MODULE_SCHEMAS = {
  module: path.join(SCHEMAS_ROOT, "module", "module.yml"),
  command: path.join(SCHEMAS_ROOT, "module", "command.yml"),
  model: path.join(SCHEMAS_ROOT, "module", "model.yml"),
  feature: path.join(SCHEMAS_ROOT, "module", "feature.yml"),
  query: path.join(SCHEMAS_ROOT, "module", "query.yml"),
} as const;

export const APP_COMPOSE_SCHEMAS = {
  app: path.join(SCHEMAS_ROOT, "app", "requirements.yml"),
  actors: path.join(SCHEMAS_ROOT, "app", "actors.yml"),
  "business-flow": path.join(SCHEMAS_ROOT, "app", "business-flow.yml"),
  story: path.join(SCHEMAS_ROOT, "app", "story.yml"),
  screen: path.join(SCHEMAS_ROOT, "app", "screen.yml"),
  resolver: path.join(SCHEMAS_ROOT, "app", "resolver.yml"),
} as const;

export const ALL_SCHEMAS: Record<string, string> = {
  ...MODULE_SCHEMAS,
  ...APP_COMPOSE_SCHEMAS,
};
