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,CAAEzC,OAAQ,iBACnBc,GACC3B,EAAAA,cAAAA,EAAAA,SAAA,KACEA,EAAAA,cAAC0B,EAAW,CAACC,MAAOA,EAAOuC,UAAWJ,IACtC9D,EAAAA,cAACmE,EAAAA,GAAiBC,EAAAA,EAAAA,GAAuBzC,KAGzC,EAGRkC,EAAUxD,UAAY,CACpBsB,MAAOrB,IAAAA,QA+BT,SAlBgBiD,EAAAA,EAAAA,IACdc,EAAAA,GACAb,EAAAA,EAAAA,KAZsB,SAACc,EAAOZ,GAAQ,MAAM,CAC5C/B,OAAO4C,EAAAA,EAAAA,IAAmBD,GAC1BL,QAAQO,EAAAA,EAAAA,IAAoBF,GAC7B,KAUCd,EAAAA,EAAAA,IAAQ,MARiB,SAACC,EAAUgB,GAAK,MAAM,CAC/CC,WAAY,WAAF,OACRjB,GAASiB,EAAAA,EAAAA,GAAWC,EAAAA,GAASC,MAAOH,EAAM9C,MAAMkD,GAAIJ,EAAM9C,MAAMe,MAAM,EACzE,KAMCoC,EAAAA,EAAAA,IAAU,CACRC,kBAAiB,WACXC,KAAKP,MAAM9C,OACbqD,KAAKP,MAAMC,YAEf,EACAO,mBAAkB,SAACC,GAAW,IAAAC,EAAAC,GACT,QAAfD,EAAAD,EAAUvD,aAAK,IAAAwD,OAAA,EAAfA,EAAiBN,OAAuB,QAArBO,EAAKJ,KAAKP,MAAM9C,aAAK,IAAAyD,OAAA,EAAhBA,EAAkBP,KAC5CG,KAAKP,MAAMC,YAEf,IAIJ,CAAuBb,E","sources":["webpack://@govx/govx-shop/./src/desktop/components/BrandPage/BrandModal/index.js","webpack://@govx/govx-shop/./src/desktop/components/BrandPage/BrandHeader/index.js","webpack://@govx/govx-shop/./src/desktop/components/BrandPage/index.js"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport ModalContainer from '../../common/modals/ModalContainer'\n\nexport const BrandModal = ({ content }) => (\n <ModalContainer title='Brand Information'>\n <div dangerouslySetInnerHTML={{ __html: content }}></div>\n </ModalContainer>\n)\n\nBrandModal.propTypes = {\n content: PropTypes.string.isRequired,\n}\n\nexport default BrandModal\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport Typography from '@material-ui/core/Typography'\nimport { createUseStyles } from 'react-jss'\nimport { compose } from 'recompose'\nimport Grid from '@material-ui/core/Grid'\nimport BrandModal from '../BrandModal'\nimport { buildPictureUrl } from '../../../../utilities/picture-util'\nimport { connect } from 'react-redux'\nimport { showModal } from '../../../../redux/actions'\nconst styles = createUseStyles({\n bannerWrapper: {\n width: '100%',\n maxWidth: '1200px',\n margin: '0px auto 0px',\n },\n logo: {\n maxWidth: '100%',\n },\n brandName: {\n margin: '1em 0',\n textTransform: 'uppercase',\n color: '#222',\n fontFamily: 'geomanist-medium',\n },\n brandNameWithBanner: {\n extend: 'brandName',\n fontSize: '18px',\n },\n brandNameNoBanner: {\n extend: 'brandName',\n fontSize: '20px',\n },\n brandLink: {\n fontFamily: 'geomanist-regular',\n extend: 'brandName',\n fontSize: '14px',\n textDecoration: 'underline',\n cursor: 'pointer',\n },\n})\n\nexport const BrandHeader = ({ brand, gotoAbout, gotoTechnology }) => {\n let classes = styles()\n return (\n <div className={classes.bannerWrapper}>\n {brand.assets && brand.assets.hero ? (\n <Grid container spacing={2}>\n <Grid item xs={2}>\n {brand.assets.logo && (\n <img\n className={classes.logo}\n src={buildPictureUrl(brand.assets.logo, brand.seoName, 250)}\n />\n )}\n <div className={classes.brandNameWithBanner}>{brand.name}</div>\n {brand.description && (\n <a\n onClick={() => gotoAbout()}\n data-event-tracking={JSON.stringify({\n category: 'Brand Page',\n action: 'click',\n label: 'about',\n })}\n >\n <Typography\n variant='body2'\n classes={{ root: classes.brandLink }}\n >\n About\n </Typography>\n </a>\n )}\n\n {brand.detailDescription && (\n <a\n onClick={() => gotoTechnology()}\n data-event-tracking={JSON.stringify({\n category: 'Brand Page',\n action: 'click',\n label: 'detail description',\n })}\n >\n <Typography classes={{ root: classes.brandLink }}>\n Technology\n </Typography>\n </a>\n )}\n </Grid>\n <Grid item xs={10}>\n <img\n src={buildPictureUrl(brand.assets.hero, brand.seoName, 1200)}\n />\n </Grid>\n </Grid>\n ) : (\n <Typography\n variant='h2'\n classes={{ root: classes.brandNameNoBanner }}\n style={{ maxWidth: '1200px' }}\n >\n {brand.name}\n </Typography>\n )}\n </div>\n )\n}\n\nBrandHeader.propTypes = {\n brand: PropTypes.object.isRequired,\n}\n\nconst mapDispatchToProps = (dispatch, ownProps) => ({\n gotoAbout: () => {\n dispatch(\n showModal('DYNAMIC', {\n component: BrandModal,\n content: ownProps.brand.description,\n }),\n )\n },\n gotoTechnology: () => {\n dispatch(\n showModal('DYNAMIC', {\n component: BrandModal,\n content: ownProps.brand.detailDescription,\n }),\n )\n },\n})\nconst enhance = compose(connect(null, mapDispatchToProps))\n\nexport default enhance(BrandHeader)\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { connect } from 'react-redux'\nimport { compose, lifecycle } from 'recompose'\n\nimport {\n selectBrandDetails,\n selectProductSearch,\n} from '../../../redux/selectors'\nimport BrandHeader from './BrandHeader'\nimport { withRouter } from 'react-router'\nimport PageType from '../../../components/common/PageType'\nimport { pageViewed } from '../../../redux/modules/tracking/actions'\nimport GridsBrowser from '../../../components/GridBrowsers/GridsBrowser'\nimport useBrandProductBrowser from '../../../components/GridBrowsers/ProductsBrowser/hooks/useBrandProductBrowser'\n\nexport const BrandPage = ({\n brand,\n classes,\n location,\n mode,\n setMode,\n search,\n}) => (\n <div style={{ margin: '24px 0px 0px' }}>\n {brand && (\n <>\n <BrandHeader brand={brand} onSetMode={setMode} />\n <GridsBrowser {...useBrandProductBrowser(brand)} />\n </>\n )}\n </div>\n)\n\nBrandPage.propTypes = {\n brand: PropTypes.object,\n}\n\nconst mapStateToProps = (state, ownProps) => ({\n brand: selectBrandDetails(state),\n search: selectProductSearch(state),\n})\n\nconst mapDispatchToProps = (dispatch, props) => ({\n pageViewed: () =>\n dispatch(pageViewed(PageType.Brand, props.brand.id, props.brand.name)),\n})\n\nconst enhance = compose(\n withRouter,\n connect(mapStateToProps),\n connect(null, mapDispatchToProps),\n lifecycle({\n componentDidMount() {\n if (this.props.brand) {\n this.props.pageViewed()\n }\n },\n componentDidUpdate(prevProps) {\n if (prevProps.brand?.id !== this.props.brand?.id) {\n this.props.pageViewed()\n }\n },\n }),\n)\n\nexport default enhance(BrandPage)\n"],"names":["BrandModal","_ref","content","React","ModalContainer","title","dangerouslySetInnerHTML","__html","propTypes","PropTypes","isRequired","styles","createUseStyles","bannerWrapper","width","maxWidth","margin","logo","brandName","textTransform","color","fontFamily","brandNameWithBanner","extend","fontSize","brandNameNoBanner","brandLink","textDecoration","cursor","BrandHeader","brand","gotoAbout","gotoTechnology","classes","className","assets","hero","Grid","container","spacing","item","xs","src","buildPictureUrl","seoName","name","description","onClick","JSON","stringify","category","action","label","Typography","variant","root","detailDescription","style","compose","connect","dispatch","ownProps","showModal","component","BrandPage","setMode","location","mode","search","onSetMode","GridsBrowser","useBrandProductBrowser","withRouter","state","selectBrandDetails","selectProductSearch","props","pageViewed","PageType","Brand","id","lifecycle","componentDidMount","this","componentDidUpdate","prevProps","_prevProps$brand","_this$props$brand"],"sourceRoot":""}