"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var emblaCarousel_cjs=require("./embla-carousel.cjs.js"),react=require("react"),canUseDOM=!("undefined"==typeof window||!window.document);function useEmblaCarousel(e){var r=react.useState(),a=r[0],t=r[1],c=react.createRef();return react.useEffect(function(){canUseDOM&&null!=c&&c.current&&t(emblaCarousel_cjs(c.current,e))},[c,e]),react.useEffect(function(){return function(){return null==a?void 0:a.destroy()}},[]),[react.useCallback(function(e){var r=e.htmlTagName,a=void 0===r?"div":r,t=e.className,u=e.children;return react.createElement(a,{className:t,ref:c,style:{overflow:"hidden"}},u)},[]),a]}exports.useEmblaCarousel=useEmblaCarousel;