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,KAA/B3C,EAAM2C,uBACtChB,EAAM,SAAW3B,EAAM2C,sBAErB3C,EAAM4C,WAAiC,KAApB5C,EAAM4C,YAC3BjB,EAAM,OAAS3B,EAAM4C,WAEnB5C,EAAM6C,gBAA2C,KAAzB7C,EAAM6C,iBAChClB,EAAM,QAAU3B,EAAM6C,gBAGjBlB,CACT,C","sources":["shared/message-tile/message-tile.jsx","shared/message-tile/message-tile-module.js","shared/utils/js/utils.js"],"sourcesContent":["import React, { Component } from \"react\"\nimport { getCustomColors } from \"../utils/js/utils\"\nimport Svg from \"../_svgs/svg\"\n// eslint-disable-line no-unused-vars\nimport Emitter from \"../../helpers/emitter\"\nimport * as emits from \"../../constants/emits\"\n\nimport \"./_message-tile.scss\"\n\nimport \"lazysizes\"\nimport \"lazysizes/plugins/attrchange/ls.attrchange\"\n\nclass MessageTile extends Component {\n  static defaultProps = {\n    cover: false,\n    modifier: \"\",\n    themeClass: \"\",\n    imageUrl: \"\",\n    imageAltText: \"\",\n    title: \"\",\n    bodyText: \"\",\n    link: \"\",\n    linkText: \"\",\n    iconName: \"\",\n    backgroundColor: \"\",\n    backgroundHoverColor: \"\",\n    textColor: \"\",\n    textHoverColor: \"\",\n    modal: {},\n  }\n\n  handleClickLink(e) {\n    if (this.props.clickHandler) {\n      this.props.clickHandler()\n    }\n    if (this.props.modal && Object.keys(this.props.modal).length > 0) {\n      e.preventDefault()\n      Emitter.emit(\"*\", {\n        type: emits.REQUEST_CONTENT_MODAL_OPEN,\n        modalJson: this.props.modal,\n      })\n    }\n  }\n\n  render() {\n    const messageIconSnippet = (\n      <div className=\"message-tile__icon\">\n        {\" \"}\n        <Svg {...this.props} />{\" \"}\n      </div>\n    )\n    const linkTextSnippet = <div className=\"shop-link\">{this.props.linkText}</div>\n    const imageSnippet = (\n      <div className=\"message-tile__image\" data-epi-property-name=\"Image\">\n        <img src={this.props.imageUrl} alt={this.props.imageAltText} />\n      </div>\n    )\n\n    const style = getCustomColors(this.props)\n\n    return (\n      <a\n        href={this.props.link}\n        className={`message-tile ${this.props.cover ? \"message-tile--cover\" : this.props.modifier} ${this.props.themeClass}`}\n        style={style}\n        onClick={(e) => this.handleClickLink(e)}\n      >\n        {this.props.imageUrl && imageSnippet}\n        {!this.props.cover && (\n          <div className=\"message-tile__inner\">\n            {this.props.iconName && this.props.iconName !== \"None\" && messageIconSnippet}\n            <h4 className=\"message-tile__headline\" data-epi-property-name=\"Title\">\n              {this.props.title}\n            </h4>\n            <p className=\"message-tile__body\" data-epi-property-name=\"BodyText\">\n              {this.props.bodyText}\n            </p>\n            {this.props.linkText && linkTextSnippet}\n          </div>\n        )}\n      </a>\n    )\n  }\n}\n\nexport default MessageTile\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport MessageTile from \"./message-tile\"\n\nexport default class MessageTileModule {\n  constructor(elem) {\n    const self = this\n    self.elem = elem\n    self.data = JSON.parse(elem.dataset.model)\n    this.init()\n    return self\n  }\n\n  init() {\n    const self = this\n    ReactDOM.render(<MessageTile {...self.data} />, self.elem)\n  }\n}\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":["MessageTile","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","e","this","props","clickHandler","modal","Object","keys","length","preventDefault","Emitter","emit","type","emits","modalJson","_this","messageIconSnippet","_jsxs","className","children","_jsx","Svg","_objectSpread","linkTextSnippet","linkText","imageSnippet","src","imageUrl","alt","imageAltText","style","getCustomColors","href","link","concat","cover","modifier","themeClass","onClick","handleClickLink","iconName","title","bodyText","Component","defaultProps","backgroundColor","backgroundHoverColor","textColor","textHoverColor","MessageTileModule","elem","self","data","JSON","parse","dataset","model","init","ReactDOM"],"sourceRoot":""}