'use client';
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useLiteVimeoEmbed as l}from"../hooks/useLiteVimeoEmbed.js";import{createStyle as m,createClass as o}from"@gem-sdk/system";import{getArticleVimeoClasses as r,getImageVimeoClasses as i,getButtonVimeoClasses as a,getIframeVimeoClasses as s}from"../common/classes.js";import{getIframeVimeoStyle as c,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as p}from"../common/helpers.js";import d from"../../image/components/NextImage.js";let LiteVimeoEmbed=u=>{let{title:f,lazy:y,aspectRatio:h,poster:b}=u,{iframeSrc:g,videoId:j}=p(u),{addIframe:x,thumbnail:N,iframe:w}=l(y,j),k=u.thumbnail||N,C=m({...c(h)}),L=m({...n(h,k)}),V=o({...r(k,h)}),E=o({...i(w)}),v=o({...a(w)}),B=o({...s()});return e("article",{"aria-hidden":!0,className:V,"data-title":f,style:L,onClick:x,children:[t(d,{src:k,alt:b?.altText,title:b?.imageTitle,className:E,isDisableAspectStyle:!0,onClick:x}),t("button",{type:"button",className:v,"aria-label":"Play",children:t("svg",{className:"gp-w-5 gp-text-white",viewBox:"0 0 24 24",children:t("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"})})}),w&&t("iframe",{style:C,title:f,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:g,className:B})]})};export{LiteVimeoEmbed as default};
