{"version":3,"file":"index-BJtu65MP.js","sources":["../../../app/javascript/src/explore/scenes/Rewards/index.jsx"],"sourcesContent":["import React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport styles from './index.module.sass';\n\nconst Header = () => (\n  <>\n    <h1 className=\"mb-1 text-uppercase\">What Can I Get With My Points?</h1>\n    <p>Below you can see a breakdown of discounts based on points earned.</p>\n  </>\n);\n\nconst BreakdownDiscount = ({ discount, points }) => (\n  <li className=\"d-flex justify-content-between pb-5 border-bottom mb-5 border-dark spec__reward-points-breakdown\">\n    <strong className=\"text-uppercase\">{discount}</strong>\n    <span>{`${points} points`}</span>\n  </li>\n);\n\nconst Breakdown = ({ promos }) => (\n  <ul className={`${styles.breakdown} mx-auto fs-7 fs-sm-9`}>\n    {promos.map(( promo ) => (\n      <BreakdownDiscount\n        key={promo.id}\n        discount={promo.discount_text}\n        points={promo.price_in_points}\n      />\n    ))}\n  </ul>\n);\n\nconst Disclaimer = () => (\n  <p className={`${styles.disclaimer} mx-auto`}>\n    * Your cart should have a minimum of $50 worth of purchasing items before Rewards Points can be\n    applied. Restrictions apply.\n  </p>\n);\n\nconst Rewards = () => {\n  const promos = useSelector(( state ) => state.data.rewardPromos.data );\n\n  if ( !promos ) return null;\n\n  return (\n    <section className={`${styles.rewards} text-center`}>\n      <Header />\n      <Breakdown promos={promos} />\n      <Disclaimer />\n    </section>\n  );\n};\n\nexport default Rewards;\n"],"names":["Header","React","BreakdownDiscount","discount","points","Breakdown","promos","styles","promo","Disclaimer","Rewards","useSelector","state"],"mappings":"gTAKMA,EAAS,IAEXC,EAAA,cAAAA,EAAA,SAAA,KAAAA,EAAA,cAAC,KAAG,CAAA,UAAU,qBAAsB,EAAA,gCAA8B,EAClEA,EAAA,cAAC,IAAE,KAAA,oEAAkE,CACvE,EAGIC,EAAoB,CAAC,CAAE,SAAAC,EAAU,OAAAC,CACrC,IAAAH,EAAA,cAAC,MAAG,UAAU,kGAAA,kBACX,SAAO,CAAA,UAAU,kBAAkBE,CAAS,kBAC5C,OAAM,KAAA,GAAGC,CAAM,SAAU,CAC5B,EAGIC,EAAY,CAAC,CAAE,OAAAC,KAClBL,EAAA,cAAA,KAAA,CAAG,UAAW,GAAGM,EAAO,SAAS,yBAC/BD,EAAO,IAAME,GACZP,EAAA,cAACC,EAAA,CACC,IAAKM,EAAM,GACX,SAAUA,EAAM,cAChB,OAAQA,EAAM,eAAA,CAChB,CACD,CACH,EAGIC,EAAa,IAChBR,EAAA,cAAA,IAAA,CAAE,UAAW,GAAGM,EAAO,UAAU,UAAA,EAAY,8HAG9C,EAGIG,EAAU,IAAM,CACpB,MAAMJ,EAASK,EAAcC,GAAWA,EAAM,KAAK,aAAa,IAAK,EAEhE,OAACN,kBAGH,UAAQ,CAAA,UAAW,GAAGC,EAAO,OAAO,cACnC,EAAAN,EAAA,cAACD,EAAO,IAAA,kBACPK,EAAU,CAAA,OAAAC,EAAgB,EAC3BL,EAAA,cAACQ,MAAW,CACd,EAPoB,IASxB"}