{"version":3,"sources":["assets/master-builders-logo.png","screens/ProductDetails.js"],"names":["useStyles","makeStyles","theme","backdrop","zIndex","drawer","color","ProductDetails","location","useLocation","dispatch","useDispatch","classes","useState","tabValue","setTabValue","productToShow","setProductToShow","useSelector","state","products","product","isProductLoading","isLoaded","useEffect","name","pathname","productName","getPathParameter","searchProductByNameAsKeyWord","searchProductByName","handleTabChange","event","newValue","a11yProps","index","id","renderData","dataList","Array","isArray","map","data","className","length","renderTabContent","applications","advantages","packaging","colorContent","renderAccordian","title","isExpanded","expandIcon","aria-controls","renderProductDetailInfo","needToShowDetail","position","value","onChange","aria-label","label","open","charSet","pascalCase","property","content","tagline","keywords","rel","href","container","spacing","item","xs","sm","md","lg","xl","src","masterBuilderLogo","alt","description","document","target","variant"],"mappings":"gIAAe,QAA0B,kD,6QC2BnCA,G,OAAYC,aAAW,SAACC,GAAD,MAAY,CACvCC,SAAU,CACRC,OAAQF,EAAME,OAAOC,OAAS,EAC9BC,MAAO,aA4QIC,UAxQQ,WACrB,IAAMC,EAAWC,cACXC,EAAWC,cACXC,EAAUZ,IAHW,EAKKa,mBAAS,GALd,mBAKpBC,EALoB,KAKVC,EALU,OAMeF,mBAAS,IANxB,mBAMpBG,EANoB,KAMLC,EANK,OAQqBC,aAC9C,SAACC,GAAD,OAAWA,EAAMC,YADXC,EARmB,EAQnBA,QAASC,EARU,EAQVA,iBAAkBC,EARR,EAQQA,SAInCC,qBAAU,WACR,GAAKhB,EAASW,OAAUI,GAAaD,GAS9B,GACLd,EAASW,OACTX,EAASW,MAAME,SACfb,EAASW,MAAME,QAAQI,KACvB,CACA,IAAMJ,EAAUb,EAASW,MAAME,QAC/BJ,EAAiBI,QAfoC,CAAC,IAC9CK,EAAalB,EAAbkB,SACJC,EAAcC,YAAiBF,EAAU,GACzCC,EACFjB,EAASmB,YAA6BF,KAEtCA,EAAcC,YAAiBF,EAAU,GACzChB,EAASoB,YAAoBH,QAUhC,CAACX,EAAeR,EAAUe,EAAUD,EAAk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BAAMzC,KAAK,sBAAsByC,QAASlD,EAAcmD,UACxD,sBAAM1C,KAAK,gBAAgByC,QAASF,YAAWhD,EAAcS,WA9MjE,eAAC,IAAD,CAAM8C,WAAS,EAACC,QAAS,EAAG7B,UAAU,uBAAtC,UACE,cAAC,IAAD,CACE8B,MAAI,EACJC,GAAI,GACJC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJnC,UAAU,kBAPZ,SASE,qBAAKA,UAAU,gBAAf,SACE,qBAAKoC,IAAKC,IAAmBC,IAAKjE,EAAcmD,cAIpD,cAAC,IAAD,CACEM,MAAI,EACJC,GAAI,GACJC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJnC,UAAU,kBAPZ,SASE,sBAAKA,UAAU,cAAf,UACE,sBAAKA,UAAU,QAAf,UACE,oBAAIA,UAAU,OAAd,SAAsB3B,EAAcS,OACpC,oBAAIkB,UAAU,UAAd,SACE,4BAAI3B,EAAcmD,eAItB,sBAAMxB,UAAU,cAAhB,SAA+B3B,EAAckE,cAC7C,mBACEZ,KAAMtD,EAAcmE,SACpBC,OAAO,SACPf,IAAI,sBAHN,SAKE,cAAC,IAAD,CAAQgB,QAAQ,YAAhB,4CA2KN,cAAC,IAAD,IACC9B","file":"static/js/9.3c82043f.chunk.js","sourcesContent":["export default __webpack_public_path__ + \"static/media/master-builders-logo.0d4703f5.png\";","import React, { useState, useEffect } from 'react';\nimport { useLocation } from 'react-router';\nimport { Helmet } from 'react-helmet';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { WindMillLoading } from 'react-loadingg';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Backdrop from '@material-ui/core/Backdrop';\nimport Divider from '@material-ui/core/Divider';\nimport Grid from '@material-ui/core/Grid';\nimport Button from '@material-ui/core/Button';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport AppBar from '@material-ui/core/AppBar';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\n\nimport { getPathParameter, pascalCase } from '../utils';\nimport {\n searchProductByName,\n searchProductByNameAsKeyWord,\n} from '../actions/searchProductAction';\nimport masterBuilderLogo from '../assets/master-builders-logo.png';\nimport '../styles/productDetails.scss';\n\nconst useStyles = makeStyles((theme) => ({\n backdrop: {\n zIndex: theme.zIndex.drawer + 1,\n color: '#fff',\n },\n}));\n\nconst ProductDetails = () => {\n const location = useLocation();\n const dispatch = useDispatch();\n const classes = useStyles();\n\n const [tabValue, setTabValue] = useState(0);\n const [productToShow, setProductToShow] = useState({});\n\n const { product, isProductLoading, isLoaded } = useSelector(\n (state) => state.products\n );\n\n useEffect(() => {\n if (!location.state && !isLoaded && !isProductLoading) {\n const { pathname } = location;\n let productName = getPathParameter(pathname, 3);\n if (productName) {\n dispatch(searchProductByNameAsKeyWord(productName));\n } else {\n productName = getPathParameter(pathname, 2);\n dispatch(searchProductByName(productName));\n }\n } else if (\n location.state &&\n location.state.product &&\n location.state.product.name\n ) {\n const product = location.state.product;\n setProductToShow(product);\n }\n }, [productToShow, location, isLoaded, isProductLoading, dispatch]);\n\n useEffect(() => {\n if (product && product.name && isLoaded) {\n setProductToShow(product);\n }\n }, [product, isLoaded]);\n\n const renderProductBasicInfo = () => {\n return (\n \n
{productToShow.name}
\n \n {productToShow.tagline}\n
\n