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C;AAAf,KACKH,IAAI,CAACI,WAAL,IACGJ,IAAI,CAACI,WAAL,CAAiBb,MAAjB,GAA0B,CAD7B,IAEGS,IAAI,CAACI,WAAL,CAAiBL,GAAjB,CACI,CAACM,MAAD,EAASC,UAAT,KACIC,KAAK,CAACF,MAAM,CAACG,KAAR,CAAL,gBACI;AACI,OAAG,EAAEF,UADT;AAEI,aAAS,EAAC;AAFd,kBAII;AACI,aAAS,EAAC,oCADd;AAEI,2BAAuB,EAAE;AACrBG,MAAAA,MAAM,EACFJ,MAAM,CAACG;AAFU;AAF7B,IAJJ,CADJ,gBAcI;AACI,aAAS,EAAC,8GADd;AAEI,OAAG,EAAEF;AAFT,kBAII;AAAK,aAAS,EAAC;AAAf,kBACI;AAAI,aAAS,EAAC;AAAd,KAEQD,MAAM,CAACK,WAFf,CADJ,eAMI,+DACKL,MAAM,CAACG,KADZ,OANJ,CAJJ,eAcI;AACI,aAAS,EAAG,sFAAqFH,MAAM,CAACG,KAAM;AADlH,IAdJ,CAhBZ,CAHR,CADJ,CAXJ,CADH,CADL,CAFJ,CAHR;AAkEH,CAnFD;;AAqFA,iEAAexB,aAAf","sources":["webpack:///./Scripts/Components/Specification.js"],"sourcesContent":["import React, { Fragment } from 'react';\nimport { useSelector } from 'react-redux';\n\nconst Specification = ({ specifications, title }) => {\n    const selectedSpecification = useSelector((state) => state.specification);\n    \n    let specArr;\n    if (\n        selectedSpecification?.specifications &&\n        selectedSpecification.specifications.length > 0\n    ) {\n        specArr = JSON.parse(selectedSpecification.specifications);\n    } else {\n        specArr = JSON.parse(specifications);\n    }\n    if (!specArr) specArr = false;\n\n    const setSelected = (event) => {\n        event.currentTarget.classList.toggle('expanded');\n    };\n    return (\n        specArr &&\n        specArr.length > 0 && (\n            <div className=\"small-12 large-12 columns product-about\">\n                <h3 className=\"product-about__block-title\">{title}</h3>\n                <div className=\"product-about__accordion\">\n                    {specArr.map((spec, index) => (\n                        <div\n                            className=\"product-about__heading-container\"\n                            key={index}\n                            onClick={(e) => setSelected(e)}\n                        >\n                            <div className=\"product-about__heading\">\n                                <h2 className=\"product-about__title\">\n                                    {spec.heading}\n                                </h2>\n                                <div className=\"product-about__icon\"></div>\n                            </div>\n                            <div className=\"product-about__content\">\n                                <div className=\" product-about__documents\">\n                                    {spec.fieldValues &&\n                                        spec.fieldValues.length > 0 &&\n                                        spec.fieldValues.map(\n                                            (speces, indexInner) =>\n                                                isNaN(speces.value) ? (\n                                                    <div\n                                                        key={indexInner}\n                                                        className=\"product-about__specifications\"\n                                                    >\n                                                        <div\n                                                            className=\"product-about__specifications-item\"\n                                                            dangerouslySetInnerHTML={{\n                                                                __html:\n                                                                    speces.value,\n                                                            }}\n                                                        ></div>\n                                                    </div>\n                                                ) : (\n                                                    <div\n                                                        className=\"product-about__specifications product-about__specifications--range product-about__specifications--full-width\"\n                                                        key={indexInner}\n                                                    >\n                                                        <div className=\"product-about__specifications-item-wrap\">\n                                                            <h3 className=\"product-about__specifications-item product-about__specifications-item--label\">\n                                                                {\n                                                                    speces.translation\n                                                                }\n                                                            </h3>\n                                                            <span>\n                                                                {speces.value}/7\n                                                            </span>\n                                                        </div>\n                                                        <div\n                                                            className={`product-about__specifications-item-range product-about__specifications-item-range--${speces.value}`}\n                                                        ></div>\n                                                    </div>\n                                                )\n                                        )}\n                                </div>\n                            </div>\n                        </div>\n                    ))}\n                </div>\n            </div>\n        )\n    );\n};\n\nexport default Specification;\n"],"names":["React","Fragment","useSelector","Specification","specifications","title","selectedSpecification","state","specification","specArr","length","JSON","parse","setSelected","event","currentTarget","classList","toggle","map","spec","index","e","heading","fieldValues","speces","indexInner","isNaN","value","__html","translation"],"sourceRoot":""}