{"version":3,"file":"gender.mjs","names":[],"sources":["../../../../src/transpiler/gender/gender.ts"],"sourcesContent":["import type { TypedNodeModel } from '@intlayer/types/nodeType';\nimport { formatNodeType, GENDER } from '@intlayer/types/nodeType';\n\nexport type Gender = 'male' | 'female' | 'fallback';\n\nexport type GenderContentStates<Content> = Record<`${Gender}`, Content> & {\n  fallback?: Content;\n};\n\nexport type GenderContent<Content = unknown> = TypedNodeModel<\n  typeof GENDER,\n  GenderContentStates<Content>\n>;\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a gender.\n *\n * Usage:\n *\n * ```ts\n * gender({\n *  'true': 'The gender is validated',\n *  'false': 'The gender is not validated',\n * });\n * ```\n *\n * The last key provided will be used as the fallback value.\n *\n */\nconst gender = <Content>(\n  content?: GenderContentStates<Content>\n): GenderContent<Content> => formatNodeType(GENDER, content);\n\nexport { gender };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,UACJ,YAC2B,eAAe,QAAQ,QAAQ"}