{"version":3,"file":"/js/blocks/featured-jobs/script.js","mappings":"6IAEAA,SAASC,iBAAiB,oBAAoB,WAC5CD,SACGE,iBAAiB,+BACjBC,SAAQ,SAACC,GACR,IAAMC,EAAQ,IAAIC,EAAAA,EAAMF,EAAU,CAChCG,KAAM,SACNC,QAAS,EACTC,IAAK,GACLC,OAAO,EACPC,YAAa,CACX,IAAK,CACHH,QAAS,GAEX,IAAK,CACHA,QAAS,MAGZI,QAEGC,EAAe,WACnB,IAAMC,EAAYd,SAASe,cAAc,uBACnCC,EAAYhB,SAASe,cAAc,wBACnCE,EAAcZ,EAAMa,GAAGC,KAAKC,OAAOC,OAGrB,IAAhBhB,EAAMiB,MACRR,EAAUS,MAAMC,QAAU,OAE1BV,EAAUS,MAAMC,QAAU,QAK1BnB,EAAMiB,QAAUjB,EAAMoB,SAASjB,QAAU,GACzCH,EAAMiB,QAAUjB,EAAMoB,SAASC,aAAe,EAE9CV,EAAUO,MAAMC,QAAU,OAE1BR,EAAUO,MAAMC,QAAU,QAGxBP,GAAe,GAAKU,OAAOC,WAAa,MAC1CZ,EAAUO,MAAMC,QAAU,OAE9B,EAGAnB,EAAMwB,GAAG,CAAC,YAAa,UAAWhB,GAGlCA,GACF,GACJ,G","sources":["webpack://wp-plugin-cirrus-blocks/./blocks/featured-jobs/script.js"],"sourcesContent":["import Glide from \"@glidejs/glide\";\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n document\n .querySelectorAll(\".glide-cirrus-featured-jobs\")\n .forEach((carousel) => { \n const glide = new Glide(carousel, {\n type: \"slider\",\n perView: 3,\n gap: 15,\n bound: true,\n breakpoints: {\n 768: {\n perView: 1,\n },\n 992: {\n perView: 2,\n },\n },\n }).mount();\n\n const updateArrows = () => {\n const prevArrow = document.querySelector(\".glide__arrow--left\");\n const nextArrow = document.querySelector(\".glide__arrow--right\");\n const totalSlides = glide._c.Html.slides.length;\n\n // Hide prevArrow if at the first slide\n if (glide.index === 0) {\n prevArrow.style.display = \"none\";\n } else {\n prevArrow.style.display = \"block\";\n }\n\n // Hide nextArrow if at the last slide\n if (\n glide.index === glide.settings.perView - 1 ||\n glide.index === glide.settings.slidesToShow - 1\n ) {\n nextArrow.style.display = \"none\";\n } else {\n nextArrow.style.display = \"block\";\n }\n\n if (totalSlides <= 3 && window.innerWidth > 992) {\n nextArrow.style.display = \"none\";\n }\n };\n\n // Update arrows after running or resizing\n glide.on([\"run.after\", \"resize\"], updateArrows);\n\n // Initial arrow state\n updateArrows();\n });\n});\n"],"names":["document","addEventListener","querySelectorAll","forEach","carousel","glide","Glide","type","perView","gap","bound","breakpoints","mount","updateArrows","prevArrow","querySelector","nextArrow","totalSlides","_c","Html","slides","length","index","style","display","settings","slidesToShow","window","innerWidth","on"],"sourceRoot":""}