{"version":3,"file":"plural.cjs","names":["PLURAL"],"sources":["../../../../src/transpiler/plural/plural.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, PLURAL } from '@intlayer/types/nodeType';\n\nexport type PluralCategory = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other';\n\nexport type PluralContentState<Content> = Partial<\n  Record<PluralCategory, Content>\n> & {\n  other: Content;\n};\n\nexport type PluralContent<Content = unknown> = TypedNodeModel<\n  typeof PLURAL,\n  PluralContentState<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a quantity using CLDR pluralization rules\n * (`Intl.PluralRules`). The selected category depends on the active locale.\n *\n * Supported categories: `zero`, `one`, `two`, `few`, `many`, `other`.\n * `other` is required as the fallback.\n *\n * The string content can include a `{{count}}` placeholder, which is\n * automatically replaced with the provided count.\n *\n * Usage:\n *\n * ```ts\n * plural({\n *   one: '{{count}} вакансия',\n *   few: '{{count}} вакансии',\n *   many: '{{count}} вакансий',\n *   other: '{{count}} вакансий',\n * });\n * ```\n */\nconst plural = <Content = unknown>(\n  content: PluralContentState<Content>\n): PluralContent<Content> => formatNodeType(PLURAL, content);\n\nexport { plural };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAM,UACJ,yDAC0CA,iCAAQ,QAAQ"}