{"version":3,"file":"useNumber.cjs","names":["resolveAmbientLocale","number"],"sources":["../../../../src/server/format/useNumber.ts"],"sourcesContent":["import { number } from '@intlayer/core/formatters';\nimport { resolveAmbientLocale } from '../ambientLocale';\n\n/**\n * On the server side, hook returning a `number` formatter bound to the ambient\n * locale: the server context, falling back to the locale carried by the\n * request. A per-call `locale` option still wins.\n *\n * Reimplemented rather than re-exported from `react-intlayer/server/format`:\n * that one takes no locale argument, so there is no way to hand it the ambient\n * locale — it would read the server context alone and format with the default\n * locale on any render the provider did not reach.\n */\nexport const useNumber = () => {\n  const locale = resolveAmbientLocale();\n\n  return (...args: Parameters<typeof number>) =>\n    number(args[0], {\n      ...args[1],\n      locale: args[1]?.locale ?? locale,\n    });\n};\n"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAa,kBAAkB;CAC7B,MAAM,SAASA,kDAAqB;CAEpC,QAAQ,GAAG,aACTC,kCAAO,KAAK,IAAI;EACd,GAAG,KAAK;EACR,QAAQ,KAAK,EAAE,EAAE,UAAU;CAC7B,CAAC;AACL"}