{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "locale",
  "title": "Locale",
  "description": "The number and date locale for a subtree, with `en` as the default.",
  "registryDependencies": [
    "https://sproutboat.com/ikada/r/format.json"
  ],
  "files": [
    {
      "path": "registry/ikada/lib/ikada/locale.tsx",
      "content": "\"use client\";\n\n/** The number and date locale for a subtree, with `en` as the default. */\nimport { createContext, useContext } from \"react\";\nimport { DEFAULT_LOCALE } from \"@/components/ikada/lib/format\";\n\nconst LocaleContext = createContext<string>(DEFAULT_LOCALE);\n\n/** Sets the number-formatting locale for a subtree. Default `en`. A component's own `locale` prop wins. */\nexport const LocaleProvider = LocaleContext.Provider;\n\n/** The locale to format with: the explicit one, else the provider's, else `en`. */\nexport function useLocale(override?: string): string {\n  const inherited = useContext(LocaleContext);\n  return override ?? inherited;\n}\n",
      "type": "registry:lib",
      "target": "@components/ikada/lib/locale.tsx"
    }
  ],
  "categories": [
    "utilities"
  ],
  "type": "registry:lib"
}