"use strict";var e=require("@gem-sdk/core"),t=require("./helpers.js");const o=e=>({desktop:e?.desktop?.width,tablet:e?.tablet?.width,mobile:e?.mobile?.width}),l=e=>({desktop:e?.desktop?.height,tablet:e?.tablet?.height,mobile:e?.mobile?.height}),s=(e,t)=>`--${e}${"desktop"===t?"":`-${t}`}`;exports.getAllowDotConfig=()=>({desktop:!1,tablet:!1,mobile:!1}),exports.getCarouselVerticalConfigByPosition=t=>{let o={};return["desktop","mobile","tablet"].forEach(l=>{let s=e.getResponsiveValueByScreen(t,l);o="right"==s||"left"==s?{...o,[l]:!0}:{...o,[l]:!1}}),o},exports.getClassJustifyByPosition=t=>{let o={};return["desktop","mobile","tablet"].forEach(l=>{let s=e.getResponsiveValueByScreen(t,l);o={...o,[`${"desktop"===l?"":`${l}:`}!gp-justify-center`]:"bottom-center"===s}}),o},exports.getClassOverflowAndFlexWrapForGrid=t=>{let o={};return["desktop","mobile","tablet"].forEach(l=>{let s=e.getResponsiveValueByScreen(t,l);o={...o,[`${"desktop"===l?"":`${l}:`}!gp-flex-nowrap`]:"left"===s||"right"===s,[`${"desktop"===l?"":`${l}:`}gp-overflow-y-auto `]:"left"===s||"right"===s,[`${"desktop"===l?"":`${l}:`}!gp-items-end`]:"left"===s,[`${"desktop"===l?"":`${l}:`}!gp-items-start`]:"right"===s}}),o},exports.getGalleryImageAspectRatio=(t,s)=>e.makeAspectRatio(s,o(t),l(t)),exports.getSliderPerShowConfig=(t,o)=>{let l={};return["desktop","mobile","tablet"].forEach(s=>{let r=e.getResponsiveValueByScreen(t,s),i=e.getResponsiveValueByScreen(o,s);l={...l,[s]:"left"===i||"right"===i?"auto":r}}),l},exports.getStyleGallerySpacing=(t,o)=>{let l={};return["desktop","mobile","tablet"].forEach(r=>{let i=e.getResponsiveValueByScreen(t,r),p=s("mt",r),a=s("mr",r),n=s("ml",r);l="left"==i?{...l,[a]:e.getResponsiveValueByScreen(o,r),[p]:"0px",[n]:"0px"}:"right"==i?{...l,[n]:e.getResponsiveValueByScreen(o,r),[a]:"0px",[p]:"0px"}:{...l,[p]:e.getResponsiveValueByScreen(o,r),[a]:"0px",[n]:"0px"}}),l},exports.getStyleWidthForGallery=t=>{let o=t?.width;return["desktop","mobile","tablet"].forEach(l=>{let s=e.getResponsiveValueByScreen(t?.galleryVisible,l),r=e.getResponsiveValueByScreen(t?.featureImageVisible,l),i=e.getResponsiveValueByScreen(t?.position,l);o={...o,[l]:("left"===i||"right"===i)&&s&&r?e.getResponsiveValueByScreen(t?.widthHorizontalLayout,l):e.getResponsiveValueByScreen(t?.width,l)}}),{...e.makeStyleResponsive("w",e.makeWidth(o,{desktop:!1,tablet:!1,mobile:!1}))}},exports.getStyleWidthForGridItem=(o,l,s)=>{let r={desktop:`${100/(o?.desktop||1)}%`,tablet:`${100/(o?.tablet||1)}%`,mobile:`${100/(o?.mobile||1)}%`};return["desktop","mobile","tablet"].forEach(i=>{let p=e.getResponsiveValueByScreen(s,i);r={...r,[i]:`${"bottom-left"!==p&&"bottom-center"!==p&&p?"100%":`calc(${100/(o?.[i]||5)}% - ${t.convertUnitToNumber(l?.[i],5)*((o?.[i]||5)-1)/(o?.[i]||5)}px)`}`}}),e.makeStyleResponsive("w",r)},exports.getZoomDisplay=o=>t.getDisplayStyle(t=>!e.getResponsiveValueByScreen(o,t),"flex");
