{"version":3,"sources":["webpack:///./Avensia.Common/Features/Shared/Sigvaris/CampaignThemeLink/util.tsx","webpack:///./Avensia.Common/Features/Shared/Sigvaris/CampaignThemeLink/index.tsx"],"names":["mapLinkColor","props","siteTheme","fillInBlock","themeType","themeColorLight","themeColorDark","themeColor","colors","lightBlue","darkBlue","mapHoverLinkColor","theme","createElement","Link","css","Object","assign","color","isTextUnderline","textDecoration","to","target","children","ThemePrimary","mapTheme","primary","secondary","primaryDark","A","margin","y","fontSize"],"mappings":";4JACO,MAAMA,EAAe,CAACC,EAAOC,KAChC,GAAID,EAAME,YACN,OAAQF,EAAMG,WACV,IAAK,QACD,OAAO,KACX,IAAK,QACD,OAAO,IACX,IAAK,OACD,OAAO,IACX,IAAK,aACD,OAAOH,EAAMI,gBACjB,IAAK,YACD,OAAOJ,EAAMK,eACjB,IAAK,QACD,OAAOL,EAAMM,WACjB,IAAK,YACD,OAAOL,EAAUM,OAAOC,UAC5B,IAAK,WACD,OAAOP,EAAUM,OAAOE,cAIhC,OAAQT,EAAMG,WACV,IAAK,QAEL,IAAK,YACD,OAAO,KACX,IAAK,aAIL,QACI,OAAOH,EAAMM,WAHjB,IAAK,YACD,OAAON,EAAMI,kBAMhBM,EAAoB,CAACV,EAAOC,KACrC,GAAID,EAAME,YACN,OAAQF,EAAMG,WACV,IAAK,QAUL,QACI,OAAOH,EAAMK,eATjB,IAAK,QACD,OAAOL,EAAMI,gBACjB,IAAK,OACD,OAAOJ,EAAMM,WACjB,IAAK,WAEL,IAAK,YACD,OAAOL,EAAUM,OAAOE,cAMhC,OAAQT,EAAMG,WACV,IAAK,QAKL,IAAK,YAEL,IAAK,WACD,OAAO,KANX,IAAK,aACL,IAAK,YACD,OAAOF,EAAUM,OAAOE,SAK5B,QACI,OAAOT,EAAMK,iBCxCd,iBAZYL,IACvB,MAAM,WAAEM,EAAU,gBAAEF,EAAe,eAAEC,GAAmB,qBAAW,KAC7DJ,EAAY,cAQlB,MAhBa,EAACD,EAAOW,EAAOV,IACxBU,EAAML,WACE,IAAMM,cAAcC,EAAM,CAAEC,IAAKC,OAAOC,OAAO,CAAEC,MAAOlB,EAAaY,EAAOV,GAAY,SAAU,CAAEgB,MAAOP,EAAkBC,EAAOV,KAAiBD,EAAMkB,gBAAkB,CAAEC,eAAgB,aAAgB,CAAEA,eAAgB,SAAYC,GAAIpB,EAAMoB,GAAIC,OAAQrB,EAAMqB,QAAUrB,EAAMsB,UAE7R,IAAMV,cAAcW,EAAc,CAAEH,GAAIpB,EAAMoB,GAAIC,OAAQrB,EAAMqB,QAAUrB,EAAMsB,UAYjFE,CAASxB,EAPG,CACfM,WAAYA,GAA0BL,EAAUM,OAAOkB,QACvDrB,gBAAiBE,EAAaF,EAAkBH,EAAUM,OAAOmB,UACjErB,eAAgBC,EAAaD,EAAiBJ,EAAUM,OAAOoB,YAC/DxB,UAAWH,EAAMG,UACjBD,YAAaF,EAAME,aAEYD,MAGvC,MAAMY,EAAO,YAAOe,EAAA,EAAG,aAAc,KAAQb,OAAOC,OAAOD,OAAOC,OAAOD,OAAOC,OAAO,CAAEC,MAAO,EAAGhB,eAAgBA,EAAUM,OAAOkB,QAASI,OAAQ,CAAEC,EAAG,OAAY,YAAM,KAAgB,CACxLC,SAAU,OACT,YAAM,KAAe,CACtBA,SAAU,OACT,YAAM,KAAe,CACtBA,SAAU,QAERR,EAAe,YAAOV,EAAM,CAC9BI,MAAO,EAAGhB,eAAgBA,EAAUM,OAAOkB,QAC3C,SAAU,CAAER,MAAO,EAAGhB,eAAgBA,EAAUM,OAAOoB,aACvD,UAAW,CAAEV,MAAO,EAAGhB,eAAgBA,EAAUM,OAAOoB","file":"assets/6.chunk.74150ba537fae4b9f093.js","sourcesContent":["import { white, black, grey } from 'Shared/Style';\r\nexport const mapLinkColor = (props, siteTheme) => {\r\n if (props.fillInBlock) {\r\n switch (props.themeType) {\r\n case 'white':\r\n return white;\r\n case 'black':\r\n return black;\r\n case 'grey':\r\n return grey;\r\n case 'themeLight':\r\n return props.themeColorLight;\r\n case 'themeDark':\r\n return props.themeColorDark;\r\n case 'theme':\r\n return props.themeColor;\r\n case 'lightBlue':\r\n return siteTheme.colors.lightBlue;\r\n case 'darkBlue':\r\n return siteTheme.colors.darkBlue;\r\n }\r\n }\r\n else {\r\n switch (props.themeType) {\r\n case 'theme':\r\n return white;\r\n case 'lightBlue':\r\n return white;\r\n case 'themeLight':\r\n return props.themeColor;\r\n case 'themeDark':\r\n return props.themeColorLight;\r\n default:\r\n return props.themeColor;\r\n }\r\n }\r\n};\r\nexport const mapHoverLinkColor = (props, siteTheme) => {\r\n if (props.fillInBlock) {\r\n switch (props.themeType) {\r\n case 'white':\r\n return props.themeColorDark;\r\n case 'black':\r\n return props.themeColorLight;\r\n case 'grey':\r\n return props.themeColor;\r\n case 'darkBlue':\r\n return siteTheme.colors.darkBlue;\r\n case 'lightBlue':\r\n return siteTheme.colors.darkBlue;\r\n default:\r\n return props.themeColorDark;\r\n }\r\n }\r\n else {\r\n switch (props.themeType) {\r\n case 'theme':\r\n return white;\r\n case 'themeLight':\r\n case 'lightBlue':\r\n return siteTheme.colors.darkBlue;\r\n case 'themeDark':\r\n return white;\r\n case 'darkBlue':\r\n return white;\r\n default:\r\n return props.themeColorDark;\r\n }\r\n }\r\n};\r\n","import React, { useContext } from 'react';\r\nimport A from 'Shared/Generic/A';\r\nimport { media } from '@glitz/core';\r\nimport { mediaMinMedium, delta, mediaMinSmall, figma, mediaMinMicro, epsilon, sourceSansPro, medium, } from 'Shared/Style';\r\nimport { styled } from '@glitz/react';\r\nimport { CampaignBrandContext } from 'Pages/Campaign/CampaignBrandPageContext';\r\nimport { useCurrentTheme } from 'SiteLayout/Theming';\r\nimport { mapHoverLinkColor, mapLinkColor } from './util';\r\nconst mapTheme = (props, theme, siteTheme) => {\r\n if (theme.themeColor) {\r\n return (React.createElement(Link, { css: Object.assign({ color: mapLinkColor(theme, siteTheme), ':hover': { color: mapHoverLinkColor(theme, siteTheme) } }, (props.isTextUnderline ? { textDecoration: 'underline' } : { textDecoration: 'none' })), to: props.to, target: props.target }, props.children));\r\n }\r\n return (React.createElement(ThemePrimary, { to: props.to, target: props.target }, props.children));\r\n};\r\nconst CampaignThemeLink = (props) => {\r\n const { themeColor, themeColorLight, themeColorDark } = useContext(CampaignBrandContext);\r\n const siteTheme = useCurrentTheme();\r\n const themeProps = {\r\n themeColor: themeColor ? themeColor : siteTheme.colors.primary,\r\n themeColorLight: themeColor ? themeColorLight : siteTheme.colors.secondary,\r\n themeColorDark: themeColor ? themeColorDark : siteTheme.colors.primaryDark,\r\n themeType: props.themeType,\r\n fillInBlock: props.fillInBlock,\r\n };\r\n return mapTheme(props, themeProps, siteTheme);\r\n};\r\nexport default styled(CampaignThemeLink);\r\nconst Link = styled(A, sourceSansPro(delta), Object.assign(Object.assign(Object.assign({ color: ({ siteTheme }) => siteTheme.colors.primary, margin: { y: medium } }, media(mediaMinMedium, {\r\n fontSize: delta,\r\n})), media(mediaMinSmall, {\r\n fontSize: figma,\r\n})), media(mediaMinMicro, {\r\n fontSize: epsilon,\r\n})));\r\nconst ThemePrimary = styled(Link, {\r\n color: ({ siteTheme }) => siteTheme.colors.primary,\r\n ':hover': { color: ({ siteTheme }) => siteTheme.colors.primaryDark },\r\n ':active': { color: ({ siteTheme }) => siteTheme.colors.primaryDark },\r\n});\r\n"],"sourceRoot":""}