"use client"

import { NextIntlClientProvider } from 'next-intl'
import React from 'react'

export default function I18nProvider({
  locale,
  messages,
  children,
}: {
  locale: string
  messages: Record<string, string>
  children: React.ReactNode
}) {
  return (
    // next-intl: Provide a default timeZone to avoid ENVIRONMENT_FALLBACK mismatches
    <NextIntlClientProvider locale={locale} messages={messages} timeZone="Asia/Seoul">
      {children}
    </NextIntlClientProvider>
  )
}
