import { supportedLocales } from "./types.ts";
import type { SupportedLocale } from "./types.ts";
import { commonMessages } from "./modules/common/index.ts";
import type { CommonMessages } from "./modules/common/index.ts";
import { homeMessages } from "./modules/home/index.ts";
import type { HomeMessages } from "./modules/home/index.ts";
import { quickMessages } from "./modules/quick/index.ts";
import type { QuickMessages } from "./modules/quick/index.ts";

export type AppMessages = {
  common: CommonMessages;
  home: HomeMessages;
  quick: QuickMessages;
};

export const messages = Object.fromEntries(
  supportedLocales.map((locale) => [
    locale,
    {
      common: commonMessages[locale],
      home: homeMessages[locale],
      quick: quickMessages[locale],
    },
  ]),
) as Record<SupportedLocale, AppMessages>;
