{"version":3,"sources":["../../../../src/lib/i18n/intl-context.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nexport type MessageDescriptor = {\n  id: string;\n  defaultMessage: string;\n  description: string;\n};\n\nexport type MessageValues = Record<string, string | React.ReactNode>;\n\n/**\n * Shape of the i18n context value.\n * This mirrors the essential parts of react-intl's IntlShape without importing it.\n */\nexport interface IntlContextValue {\n  locale: string;\n  formatMessage(\n    descriptor: MessageDescriptor,\n    values?: MessageValues,\n  ): string | React.ReactNode[];\n}\n\n/**\n * Context for optional i18n support.\n * When this context has a value, translations will use react-intl.\n * When this context is null/undefined, translations will fall back to defaultMessage.\n */\nexport const IntlContext = React.createContext<IntlContextValue | null>(null);\nIntlContext.displayName = \"IntlContext\";\n\n/**\n * Hook to access the i18n context.\n * Returns null if no IntlProvider is present in the component tree.\n */\nexport function useIntl(): IntlContextValue | null {\n  return React.useContext(IntlContext);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AA2BhB,MAAM,cAAc,MAAM,cAAuC,IAAI;AAC5E,YAAY,cAAc;AAMnB,SAAS,UAAmC;AACjD,SAAO,MAAM,WAAW,WAAW;AACrC;","names":[]}