import { defineRouting } from "next-intl/routing";

export const appLocales = ["de", "en", "ar"] as const;

export type RoutingLocale = (typeof appLocales)[number];

export function createI18nRouting(defaultLocale: RoutingLocale = "de") {
  return defineRouting({
    locales: appLocales,
    defaultLocale,
    localePrefix: "as-needed",
    localeCookie: false,
    localeDetection: false,
  });
}

export const routing = createI18nRouting();
