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BAEpBjB,EAAMkB,sBAAuD,KAA/BlB,EAAMkB,uBACtCrB,EAAM,SAAWG,EAAMkB,sBAErBlB,EAAMmB,WAAiC,KAApBnB,EAAMmB,YAC3BtB,EAAM,OAASG,EAAMmB,WAEnBnB,EAAMoB,gBAA2C,KAAzBpB,EAAMoB,iBAChCvB,EAAM,QAAUG,EAAMoB,gBAGjBvB,CACT,C","sources":["shared/campaign-banner/campaign-banner.jsx","shared/utils/js/utils.js"],"sourcesContent":["import React, { Component } from \"react\"\nimport { getCustomColors } from \"../utils/js/utils\"\n// eslint-disable-line no-unused-vars\n\nimport \"./_campaign-banner.scss\"\n\nclass CampaignBanner extends Component {\n  static defaultProps = {\n    modifier: \"\",\n    linkUrl: \"#\",\n    text: \"Få 10% rabat ved køb for 1.000 DKK.\",\n    textShort: \"Få 10% rabat\",\n    underlined: \"Læs mere\",\n    backgroundUrl: \"/static/newshop/campaignbanner_10sale.png\",\n    themeClass: \"\",\n    backgroundColor: \"\",\n    backgroundHoverColor: \"\",\n    textColor: \"\",\n    textHoverColor: \"\",\n  }\n\n  render() {\n    let style = getCustomColors(this.props)\n    if (this.props.backgroundUrl) {\n      style.backgroundImage = `url(${this.props.backgroundUrl})`\n    }\n\n    return (\n      <div className={`campaign-banner ${this.props.modifier} ${this.props.themeClass}`}>\n        <a href={this.props.linkUrl} style={style}>\n          <p className=\"d-none d-block--sm\">\n            {this.props.text} <span>{this.props.underlined}</span>\n          </p>\n          <p className=\"d-none--sm\">\n            {this.props.textShort} <span>{this.props.underlined}</span>\n          </p>\n        </a>\n      </div>\n    )\n  }\n}\n\nexport default CampaignBanner\n","export function getCASCColors() {\n  return [\"mandarin\", \"carnation\", \"seablue\", \"platinum\", \"lagoon\", \"buttercup\", \"lillac\", \"forgetmenot\"]\n}\n\nexport function getCASCThemes() {\n  return [\n    \"theme-mandarin\",\n    \"theme-carnation\",\n    \"theme-seablue\",\n    \"theme-platinum\",\n    \"theme-lagoon\",\n    \"theme-buttercup\",\n    \"theme-lillac\",\n    \"theme-forgetmenot\",\n  ]\n}\n\nexport function getCASCThemesInverted() {\n  return [\n    \"theme-mandarin-inverted\",\n    \"theme-carnation-inverted\",\n    \"theme-seablue-inverted\",\n    \"theme-platinum-inverted\",\n    \"theme-lagoon-inverted\",\n    \"theme-buttercup-inverted\",\n    \"theme-lillac-inverted\",\n    \"theme-forgetmenot-inverted\",\n  ]\n}\n\nexport function getCASCAllThemes() {\n  return [\"\", \"theme-taxfree\", ...getCASCThemes(), \"theme-taxfree-inverted\", ...getCASCThemesInverted()]\n}\n\nexport function getCustomColors(props) {\n  const style = {}\n\n  if (props.backgroundColor && props.backgroundColor !== \"\") {\n    style[\"--bg\"] = props.backgroundColor\n  }\n  if (props.backgroundHoverColor && props.backgroundHoverColor !== \"\") {\n    style[\"--bgh\"] = props.backgroundHoverColor\n  }\n  if (props.textColor && props.textColor !== \"\") {\n    style[\"--c\"] = props.textColor\n  }\n  if (props.textHoverColor && props.textHoverColor !== \"\") {\n    style[\"--ch\"] = props.textHoverColor\n  }\n\n  return style\n}\n\nexport default { getCustomColors, getCASCColors, getCASCThemes, getCASCThemesInverted, getCASCAllThemes }\n"],"names":["CampaignBanner","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","style","getCustomColors","this","props","backgroundUrl","backgroundImage","concat","_jsx","className","modifier","themeClass","children","_jsxs","href","linkUrl","text","underlined","textShort","Component","defaultProps","backgroundColor","backgroundHoverColor","textColor","textHoverColor"],"sourceRoot":""}