{"version":3,"file":"195.20aaac2f704f3872.js","mappings":"kJAGA,MAiDA,EAjD8B,EAAGA,YAAWC,YAC1C,MAAMC,GAAoBC,EAAAA,EAAAA,KAAaC,GAAUA,EAAMJ,YACvD,IAAIK,EAKFA,EAHAH,GAAmBF,WACnBE,EAAkBF,UAAUM,OAAS,EAE5BC,KAAKC,MAAMN,EAAkBF,WAE7BO,KAAKC,MAAMR,GAEjBK,IAAQA,GAAS,GAItB,OACEA,GACAA,EAAOC,OAAS,GACd,uBAAKG,UAAU,2CACb,sBAAIA,UAAU,8BAA8BR,GAC5C,uBAAKQ,UAAU,4BACb,uBACEA,UAAU,oCACV,uBAAKA,UAAU,yBAAyBC,QAAUC,IAAkBA,EAVtEC,cAAcC,WAAWC,UAAUC,OAAO,WAUxC,GACE,sBAAIN,UAAU,yBAAwBO,EAAAA,EAAAA,GAAU,4BAChD,uBAAKP,UAAU,yBAEjB,uBAAKA,UAAU,0BACb,uBAAKA,UAAU,4BACZJ,EAAOY,KAAI,CAACC,EAAKC,IAChB,uBACEC,IAAKD,EACLV,UAAU,2EAEV,qBAAGY,KAAMH,EAAII,IAAKC,OAAO,SAASd,UAAU,8BAC1C,uBAAKA,UAAU,mFACb,uBAAKA,UAAU,iCAAsCS,EAAIM,cArB/E,C","sources":["webpack:///./Scripts/Components/Hillerstorp/ProductSheetDocuments.js"],"sourcesContent":["import React from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { translate } from '../../Services/translation';\r\nconst ProductSheetDocuments = ({ documents, title }) => {\r\n const selectedDocuments = useSelector((state) => state.documents);\r\n let docArr;\r\n if (\r\n selectedDocuments?.documents &&\r\n selectedDocuments.documents.length > 0\r\n ) {\r\n docArr = JSON.parse(selectedDocuments.documents);\r\n } else {\r\n docArr = JSON.parse(documents);\r\n }\r\n if (!docArr) docArr = false;\r\n const setSelected = (event) => {\r\n event.currentTarget.parentNode.classList.toggle('expanded');\r\n };\r\n return (\r\n docArr &&\r\n docArr.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 <div\r\n className=\"product-about__heading-container\">\r\n <div className=\"product-about__heading\" onClick={(e) => setSelected(e)}>\r\n <h6 className=\"product-about__title\">{translate('product.documents.title')}</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 {docArr.map((doc, indexInner) => (\r\n <div\r\n key={indexInner}\r\n className=\"product-about__specifications product-about__specifications--full-width\"\r\n >\r\n <a href={doc.url} target=\"_blank\" className=\"order-detail__product-link\">\r\n <div className=\"product-about__specifications-item product-about__specifications-item--document\">\r\n <div className=\"product-about__download-icon\"></div>{doc.name}\r\n </div></a>\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n );\r\n};\r\n\r\nexport default ProductSheetDocuments;\r\n"],"names":["documents","title","selectedDocuments","useSelector","state","docArr","length","JSON","parse","className","onClick","e","currentTarget","parentNode","classList","toggle","translate","map","doc","indexInner","key","href","url","target","name"],"sourceRoot":""}