"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");function filterTruthyStyles(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!!e))}const getStyle=(e,t)=>{let{aspectRatio:l}=e||{},r={...t,...core.makeStyleResponsive("aspect",l)};return filterTruthyStyles(r)},getYoutubeStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getVimeoStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getHtml5Style=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getFallBackImageStyle=e=>{let t={...core.makeStyleResponsive("aspect",e)};return filterTruthyStyles(t)},getPreloadImageStyle=()=>{let e={"--op":0,"--z":-1,display:"none",width:"100%",height:"auto"};return filterTruthyStyles(e)},getIframeVimeoStyle=e=>{let t={...core.makeStyleResponsive("aspect",e),position:"absolute",height:"100%",width:"100%"};return filterTruthyStyles(t)},getArticleVimeoStyle=(e,t)=>{let l={backgroundImage:`url(${t})`,...helpers.makeStyleResponsiveRatio("aspect",e)};return filterTruthyStyles(l)},getIframeYoutubeStyle=e=>{let t={...e,position:"absolute",height:"100%",width:"100%"};return filterTruthyStyles(t)},getArticleYoutubeStyle=(e,t)=>{let l={...e};return t&&(l={"background-image":`url(${t})`,...l}),filterTruthyStyles(l)};exports.getArticleVimeoStyle=getArticleVimeoStyle,exports.getArticleYoutubeStyle=getArticleYoutubeStyle,exports.getFallBackImageStyle=getFallBackImageStyle,exports.getHtml5Style=getHtml5Style,exports.getIframeVimeoStyle=getIframeVimeoStyle,exports.getIframeYoutubeStyle=getIframeYoutubeStyle,exports.getPreloadImageStyle=getPreloadImageStyle,exports.getStyle=getStyle,exports.getVimeoStyle=getVimeoStyle,exports.getYoutubeStyle=getYoutubeStyle;
