{"version":3,"names":["LINKSIZE_NORMAL","LINKSIZE_SMALL","TARGET_SELF","createSchemes","newSchemes","AllColors.LINK_SCHEMES","forEach","element","schemeName","contentColor","AllColors","toConstantCase","contentHoverColor","contentFocusColor","contentDisableColor","scheme","LINK_SCHEME_CONFIG","LINK_SCHEME_MAP","Map","Object","entries","createLinkMapDefinition","map","background","config"],"sources":["src/components/link/constants/link-constants.ts"],"sourcesContent":["import { LinkSchemeDefinition } from \"./link-types\";\nimport { BackgroundColor } from \"../../background/constants/background-types\";\nimport * as AllColors from \"../../../constants/colors\";\nimport { toConstantCase } from \"../../../utils/string-format\";\nimport { createLinkMapDefinition } from \"../../../utils/scheme-helper\";\n\nexport const LINKSIZE_NORMAL = \"normal\";\nexport const LINKSIZE_SMALL = \"small\";\n\nexport const LINK_SIZES = [LINKSIZE_NORMAL, LINKSIZE_SMALL] as const;\n\nexport const TARGET_BLANK = \"_blank\";\nexport const TARGET_SELF = \"_self\";\nexport const TARGET_PARENT = \"_parent\";\nexport const TARGET_TOP = \"_top\";\nexport const LINK_TARGETS = [TARGET_BLANK, TARGET_SELF, TARGET_PARENT, TARGET_TOP] as const;\n\nfunction createSchemes() {\n let newSchemes: AllColors.LinkSchemeConfiguration = {};\n\n AllColors.LINK_SCHEMES.forEach((element) => {\n newSchemes[element.schemeName] = {\n contentColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}`],\n contentHoverColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}_SHADE_1`],\n contentFocusColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}`],\n contentDisableColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}`]\n };\n if (element.scheme) {\n newSchemes[element.schemeName] = { ...newSchemes[element.schemeName], ...element.scheme };\n }\n });\n\n return newSchemes;\n}\n\nexport const LINK_SCHEME_CONFIG: AllColors.LinkSchemeConfiguration = createSchemes();\n\nexport const LINK_SCHEME_MAP: Map = new Map(\n Object.entries(createLinkMapDefinition()).map(([background, config]) => [\n background as BackgroundColor,\n LINK_SCHEME_CONFIG[config as string]\n ])\n);\n"],"mappings":"oHAMaA,EAAkB,S,MAClBC,EAAiB,Q,MAKjBC,EAAc,QAK3B,SAASC,IACP,IAAIC,EAAsE,GAE1EC,EAAuBC,SAASC,IAC9BH,EAAWG,EAAQC,YAAc,CAC/BC,aAAcC,EAAU,SAASC,EAAeJ,EAAQC,eACxDI,kBAAmBF,EAAU,SAASC,EAAeJ,EAAQC,uBAC7DK,kBAAmBH,EAAU,SAASC,EAAeJ,EAAQC,eAC7DM,oBAAqBJ,EAAU,SAASC,EAAeJ,EAAQC,gBAEjE,GAAID,EAAQQ,OAAQ,CAClBX,EAAWG,EAAQC,YAAc,IAAKJ,EAAWG,EAAQC,eAAgBD,EAAQQ,O,KAIrF,OAAOX,CACT,C,MAEaY,EAA8Eb,I,MAE9Ec,EAA0E,IAAIC,IACzFC,OAAOC,QAAQC,KAA2BC,KAAI,EAAEC,EAAYC,KAAY,CACtED,EACAP,EAAmBQ,c"}