'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),useLiteVimeoEmbed=require("../hooks/useLiteVimeoEmbed.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js"),NextImage=require("../../image/components/NextImage.js");const LiteVimeoEmbed=e=>{let{title:s,lazy:t,aspectRatio:l,poster:a}=e,{iframeSrc:i,videoId:m}=helpers.getVimeoParams(e),{addIframe:r,thumbnail:c,iframe:o}=useLiteVimeoEmbed.useLiteVimeoEmbed(t,m),u=e.thumbnail||c,n=system.createStyle({...styles.getIframeVimeoStyle(l)}),y=system.createStyle({...styles.getArticleVimeoStyle(l,u)}),x=system.createClass({...classes.getArticleVimeoClasses(u,l)}),d=system.createClass({...classes.getImageVimeoClasses(o)}),j=system.createClass({...classes.getButtonVimeoClasses(o)}),g=system.createClass({...classes.getIframeVimeoClasses()});return jsxRuntime.jsxs("article",{"aria-hidden":!0,className:x,"data-title":s,style:y,onClick:r,children:[jsxRuntime.jsx(NextImage.default,{src:u,alt:a?.altText,title:a?.imageTitle,className:d,isDisableAspectStyle:!0,onClick:r}),jsxRuntime.jsx("button",{type:"button",className:j,"aria-label":"Play",children:jsxRuntime.jsx("svg",{className:"gp-w-5 gp-text-white",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{fill:"currentColor",d:"M5 5.274c0-1.707 1.826-2.792 3.325-1.977l12.362 6.726c1.566.853 1.566 3.101 0 3.953L8.325 20.702C6.826 21.518 5 20.432 5 18.726V5.274Z"})})}),o&&jsxRuntime.jsx("iframe",{style:n,title:s,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:i,className:g})]})};exports.default=LiteVimeoEmbed;
