{"version":3,"file":"230.831635f9af60bb58.js","mappings":"yIAGA,MA4EA,EA5EsB,EAAGA,iBAAgBC,YACvC,MAAMC,GAAwBC,EAAAA,EAAAA,KAAaC,GAAUA,EAAMC,gBAE3D,IAAIC,EAKFA,EAHAJ,GAAuBF,gBACvBE,EAAsBF,eAAeO,OAAS,EAEpCC,KAAKC,MAAMP,EAAsBF,gBAEjCQ,KAAKC,MAAMT,GAElBM,IAASA,GAAU,GAKxB,OACEA,GACAA,EAAQC,OAAS,GACf,uBAAKG,UAAU,2CACb,sBAAIA,UAAU,8BAA8BT,GAC5C,uBAAKS,UAAU,4BACZJ,EAAQK,KAAI,CAACC,EAAMC,IAClB,uBACEH,UAAU,mCACVI,IAAKD,EACLE,QAAUC,IAAkBA,EAZhCC,cAAcC,UAAUC,OAAO,WAS7B,GAKE,uBAAKT,UAAU,0BACb,sBAAIA,UAAU,wBAAwBE,EAAKQ,SAC3C,uBAAKV,UAAU,yBAEjB,uBAAKA,UAAU,0BACb,uBAAKA,UAAU,6BACZE,EAAKS,aACJT,EAAKS,YAAYd,OAAS,GAC1BK,EAAKS,YAAYV,KAAI,CAACW,EAAQC,IACd,wBAAdD,EAAOR,KACO,wBAAdQ,EAAOR,KACP,uBACEA,IAAKS,EACLb,UAAU,iCAEV,uBAAKA,UAAU,sCACZY,EAAOE,aAEV,uBAAKd,UAAU,UACb,6BAEF,uBAAKA,UAAU,sCACZY,EAAOG,WAKjBb,EAAKS,YAAYK,QAAOC,GACX,wBAAZA,EAAKb,KACU,wBAAZa,EAAKb,MAA+BH,KAAIgB,GACzCA,EAAKF,OACL,gBAAC,EAAAG,SAAD,CAAUd,IAAKa,EAAKb,KAClB,sBAAIJ,UAAU,oCACXiB,EAAKH,aAER,yBAAIG,EAAKF,eA/C7B,C","sources":["webpack:///./Scripts/Components/Hillerstorp/Specification.js"],"sourcesContent":["import React, { Fragment } from 'react';\r\nimport { useSelector } from 'react-redux';\r\n\r\nconst Specification = ({ specifications, title }) => {\r\n const selectedSpecification = useSelector((state) => state.specification);\r\n\r\n let specArr;\r\n if (\r\n selectedSpecification?.specifications &&\r\n selectedSpecification.specifications.length > 0\r\n ) {\r\n specArr = JSON.parse(selectedSpecification.specifications);\r\n } else {\r\n specArr = JSON.parse(specifications);\r\n }\r\n if (!specArr) specArr = false;\r\n\r\n const setSelected = (event) => {\r\n event.currentTarget.classList.toggle('expanded');\r\n };\r\n return (\r\n specArr &&\r\n specArr.length > 0 && (\r\n <div className=\"small-12 large-12 columns product-about\">\r\n <h3 className=\"product-about__block-title\">{title}</h3>\r\n <div className=\"product-about__accordion\">\r\n {specArr.map((spec, index) => (\r\n <div\r\n className=\"product-about__heading-container\"\r\n key={index}\r\n onClick={(e) => setSelected(e)}\r\n >\r\n <div className=\"product-about__heading\">\r\n <h6 className=\"product-about__title\">{spec.heading}</h6>\r\n <div className=\"product-about__icon\"></div>\r\n </div>\r\n <div className=\"product-about__content\">\r\n <div className=\" product-about__documents\">\r\n {spec.fieldValues &&\r\n spec.fieldValues.length > 0 &&\r\n spec.fieldValues.map((speces, indexInner) => (\r\n speces.key != \"Material1Description\" &&\r\n speces.key != \"Material2Description\" &&\r\n <div\r\n key={indexInner}\r\n className=\"product-about__specifications\"\r\n >\r\n <div className=\"product-about__specifications-item\">\r\n {speces.translation}\r\n </div>\r\n <div className=\"spacer\">\r\n <div></div>\r\n </div>\r\n <div className=\"product-about__specifications-item\">\r\n {speces.value}\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n {spec.fieldValues.filter(item =>\r\n item.key == \"Material1Description\"\r\n || item.key == \"Material2Description\").map(item => (\r\n item.value &&\r\n <Fragment key={item.key}>\r\n <h4 className=\"product-about__description-title\">\r\n {item.translation}\r\n </h4>\r\n <p>{item.value}</p>\r\n </Fragment>\r\n ))}\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n )\r\n );\r\n};\r\n\r\nexport default Specification;\r\n"],"names":["specifications","title","selectedSpecification","useSelector","state","specification","specArr","length","JSON","parse","className","map","spec","index","key","onClick","e","currentTarget","classList","toggle","heading","fieldValues","speces","indexInner","translation","value","filter","item","Fragment"],"sourceRoot":""}