import { addMessages, init } from "svelte-i18n"
import { DEFAULT_LANGUAGE } from "./lib/i18n"
import deLocale from "./lib/i18n/locales/de.json"
import enLocale from "./lib/i18n/locales/en.json"
import App from "./App.svelte"

// SSR: load messages synchronously (Babel transforms import → require)
addMessages("de", deLocale)
addMessages("en", enLocale)

init({
    fallbackLocale: DEFAULT_LANGUAGE,
    initialLocale: DEFAULT_LANGUAGE,
})

export default App
