"use client"

import { type IntlConfig, IntlProvider } from "react-intl"

type ClientIntlProviderProps = React.PropsWithChildren<
  Pick<IntlConfig, "defaultLocale" | "locale" | "messages">
>

export default function ClientIntlProvider({
  children,
  locale,
  defaultLocale,
  messages,
}: ClientIntlProviderProps) {
  return (
    <IntlProvider
      locale={locale}
      defaultLocale={defaultLocale}
      messages={messages}
    >
      {children}
    </IntlProvider>
  )
}
