{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\user\\\\Desktop\\\\000newport\\\\src\\\\components\\\\pages\\\\home\\\\components\\\\04portefolio\\\\presentation\\\\realisation.js\",\n  _s = $RefreshSig$();\nimport React, { useState } from \"react\";\nimport UseFetch from \"../../../../../hooks/useFetch\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faAngleRight } from \"@fortawesome/free-solid-svg-icons\";\nimport Slider from \"react-slick\";\nimport { useRef } from \"react\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nconst Realisation = () => {\n  _s();\n  const {\n    data,\n    error\n  } = UseFetch(\"/realisation.json\");\n  const [currentItem, setCurrentItem] = useState(0);\n  if (error) {\n    console.log(\"Error fetching data\");\n  }\n  const settings = {\n    dots: false,\n    infinite: true,\n    speed: 500,\n    slidesToShow: 1,\n    arrows: false,\n    fade: true\n  };\n  const sliderRef = useRef();\n  const handleNext = () => {\n    sliderRef.current.slickNext();\n  };\n  const handlePrev = () => {\n    setCurrentItem(prevItem => (prevItem - 1 + data.length) % data.length);\n  };\n  return /*#__PURE__*/_jsxDEV(_Fragment, {\n    children: data.length > 0 && /*#__PURE__*/_jsxDEV(\"div\", {\n      className: \"carousel-container w-full  \",\n      children: [/*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"carousel-item flex lg:space-x-2 justify-center w-full max-lg:flex-col max-lg:space-y-2\",\n        children: [/*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"imgPortfolio w-4/6 max-lg:w-full  flex relative\",\n          children: [/*#__PURE__*/_jsxDEV(\"button\", {\n            id: \"preview\",\n            className: \"absolute backdrop-blur-xl\",\n            onClick: handlePrev,\n            disabled: currentItem === 0,\n            children: /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n              className: \"nextPre\",\n              icon: faAngleRight,\n              rotation: 180,\n              style: {\n                color: \"#ec69c3\"\n              }\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 49,\n              columnNumber: 15\n            }, this)\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 44,\n            columnNumber: 13\n          }, this), /*#__PURE__*/_jsxDEV(\"img\", {\n            src: data[currentItem].imageSrc,\n            alt: data[currentItem].titre01,\n            className: \"carouselImg\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 52,\n            columnNumber: 15\n          }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n            id: \"next\",\n            className: \"absolute backdrop-blur-xl\",\n            onClick: handleNext,\n            disabled: currentItem === data.length - 1,\n            children: /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n              icon: faAngleRight,\n              className: \"nextPre\",\n              style: {\n                color: \"#ec69c3\"\n              }\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 59,\n              columnNumber: 16\n            }, this)\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 54,\n            columnNumber: 13\n          }, this)]\n        }, void 0, true, {\n          fileName: _jsxFileName,\n          lineNumber: 43,\n          columnNumber: 13\n        }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"bg-neutral-300 responsiTitreDescrip p-2 lg:w-3/6 2xl:w-2/6 max-lg:w-full \",\n          children: [/*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"\",\n            children: [/*#__PURE__*/_jsxDEV(\"h4\", {\n              children: data[currentItem].titre01\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 66,\n              columnNumber: 17\n            }, this), /*#__PURE__*/_jsxDEV(\"h5\", {}, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 67,\n              columnNumber: 17\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 65,\n            columnNumber: 15\n          }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"\",\n            children: [/*#__PURE__*/_jsxDEV(\"p\", {\n              className: \"text-justify mt-1 px-1\",\n              children: [\" \", data[currentItem].description01]\n            }, void 0, true, {\n              fileName: _jsxFileName,\n              lineNumber: 70,\n              columnNumber: 17\n            }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n              className: \"text-justify mt-1 px-1\",\n              children: data[currentItem].description02\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 71,\n              columnNumber: 17\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 69,\n            columnNumber: 15\n          }, this)]\n        }, void 0, true, {\n          fileName: _jsxFileName,\n          lineNumber: 64,\n          columnNumber: 13\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 41,\n        columnNumber: 11\n      }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"carousel-buttons\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 75,\n        columnNumber: 11\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 40,\n      columnNumber: 9\n    }, this)\n  }, void 0, false);\n};\n_s(Realisation, \"q/xDEQTxfy1OwQ1eJrfDl8cq/u8=\");\n_c = Realisation;\nexport default Realisation;\nvar _c;\n$RefreshReg$(_c, \"Realisation\");","map":{"version":3,"names":["React","useState","UseFetch","FontAwesomeIcon","faAngleRight","Slider","useRef","jsxDEV","_jsxDEV","Fragment","_Fragment","Realisation","_s","data","error","currentItem","setCurrentItem","console","log","settings","dots","infinite","speed","slidesToShow","arrows","fade","sliderRef","handleNext","current","slickNext","handlePrev","prevItem","length","children","className","id","onClick","disabled","icon","rotation","style","color","fileName","_jsxFileName","lineNumber","columnNumber","src","imageSrc","alt","titre01","description01","description02","_c","$RefreshReg$"],"sources":["C:/Users/user/Desktop/000newport/src/components/pages/home/components/04portefolio/presentation/realisation.js"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport UseFetch from \"../../../../../hooks/useFetch\";\r\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\r\nimport { faAngleRight } from \"@fortawesome/free-solid-svg-icons\";\r\nimport Slider from \"react-slick\";\r\nimport { useRef } from \"react\";\r\n\r\n\r\nconst Realisation = () => {\r\n  const { data, error } = UseFetch(\"/realisation.json\");\r\n  const [currentItem, setCurrentItem] = useState(0);\r\n\r\n  if (error) {\r\n    console.log(\"Error fetching data\");\r\n  }\r\n\r\n  const settings={\r\n    dots: false,\r\n    infinite: true,\r\n    speed: 500,\r\n    slidesToShow: 1,\r\n    arrows: false,\r\n    fade: true,\r\n    \r\n  }\r\n  const sliderRef = useRef();\r\n\r\n  const handleNext = () => {\r\n    sliderRef.current.slickNext();\r\n  };\r\n\r\n  const handlePrev = () => {\r\n    setCurrentItem((prevItem) => (prevItem - 1 + data.length) % data.length);\r\n\r\n  };\r\n\r\n  return (\r\n    <>\r\n      {data.length > 0 && (\r\n        <div className=\"carousel-container w-full  \">\r\n          <div className=\"carousel-item flex lg:space-x-2 justify-center w-full max-lg:flex-col max-lg:space-y-2\">\r\n\r\n            <div className=\"imgPortfolio w-4/6 max-lg:w-full  flex relative\">\r\n            <button id=\"preview\"\r\n                    className=\"absolute backdrop-blur-xl\" \r\n                    onClick={handlePrev}\r\n                    disabled={currentItem === 0}>\r\n\r\n              <FontAwesomeIcon className=\"nextPre\" icon={faAngleRight} rotation={180} style={{color: \"#ec69c3\",}} />\r\n            </button>\r\n\r\n              <img src={data[currentItem].imageSrc} alt={data[currentItem].titre01} className=\"carouselImg\" />\r\n\r\n            <button id=\"next\"\r\n                    className=\"absolute backdrop-blur-xl\"\r\n                    onClick={handleNext}\r\n                    disabled={currentItem === data.length - 1}>\r\n                      \r\n               <FontAwesomeIcon icon={faAngleRight} className=\"nextPre\" style={{color: \"#ec69c3\",}} />\r\n            </button>\r\n            </div>\r\n\r\n\r\n            <div className=\"bg-neutral-300 responsiTitreDescrip p-2 lg:w-3/6 2xl:w-2/6 max-lg:w-full \">\r\n              <div className=\"\">\r\n                <h4>{data[currentItem].titre01}</h4>\r\n                <h5></h5>\r\n              </div>\r\n              <div className=\"\">\r\n                <p className=\"text-justify mt-1 px-1\"> {data[currentItem].description01}</p>\r\n                <p className=\"text-justify mt-1 px-1\">{data[currentItem].description02}</p>\r\n              </div>\r\n            </div>\r\n          </div>\r\n          <div className=\"carousel-buttons\">\r\n           \r\n           \r\n          </div>\r\n        </div>\r\n      )}\r\n    </>\r\n  );\r\n};\r\n\r\nexport default Realisation;"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,QAAQ,MAAM,+BAA+B;AACpD,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,YAAY,QAAQ,mCAAmC;AAChE,OAAOC,MAAM,MAAM,aAAa;AAChC,SAASC,MAAM,QAAQ,OAAO;AAAC,SAAAC,MAAA,IAAAC,OAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAG/B,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAAAC,EAAA;EACxB,MAAM;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGZ,QAAQ,CAAC,mBAAmB,CAAC;EACrD,MAAM,CAACa,WAAW,EAAEC,cAAc,CAAC,GAAGf,QAAQ,CAAC,CAAC,CAAC;EAEjD,IAAIa,KAAK,EAAE;IACTG,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC;EAEA,MAAMC,QAAQ,GAAC;IACbC,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,KAAK,EAAE,GAAG;IACVC,YAAY,EAAE,CAAC;IACfC,MAAM,EAAE,KAAK;IACbC,IAAI,EAAE;EAER,CAAC;EACD,MAAMC,SAAS,GAAGpB,MAAM,CAAC,CAAC;EAE1B,MAAMqB,UAAU,GAAGA,CAAA,KAAM;IACvBD,SAAS,CAACE,OAAO,CAACC,SAAS,CAAC,CAAC;EAC/B,CAAC;EAED,MAAMC,UAAU,GAAGA,CAAA,KAAM;IACvBd,cAAc,CAAEe,QAAQ,IAAK,CAACA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