"use strict";var e=require("@gem-sdk/core");const t=(t,l)=>{let o=e.getResponsiveValueByScreen(l,t);return o?"100%":"auto"},l=l=>({...e.makeStyleResponsive("w",{desktop:t("desktop",l),tablet:t("tablet",l),mobile:t("mobile",l)}),...e.makeStyleResponsive("minw",{desktop:t("desktop",l),tablet:t("tablet",l),mobile:t("mobile",l)})});exports.getAlignStyles=t=>({...e.makeStyleResponsive("jc",t?.align)}),exports.getChildBaseStyle=(e,t)=>({"--transform":"up"===e?"rotate(90deg)":"down"===e?"rotate(-90deg)":"none",...l(t)}),exports.getContainerBaseStyle=e=>{let{style:t,play:l,pauseOnHover:o,pauseOnClick:a}=e??{};return{...t,"--pause-on-hover":!l||o?"paused":"running","--pause-on-click":!l||o&&!a||a?"paused":"running","--width":"100%","--transform":"none","min-width":"100%"}},exports.getContentStyles=t=>{let{style:l,backgroundColor:o,styleWidth:a,styleHeight:i}=t||{};return{...i,...a,...l,...e.getGlobalColorResponsiveStyle("bg",o)}},exports.getFastMarqueeChildrenIconStyles=t=>{let{index:l,itemSize:o,iconSeparatorColor:a,getHeightOfIconSeparatorSize:i,getWidthOfIconSeparatorSize:s,getIconPosition:p}=t??{};return{...e.makeStyle({c:a}),...l<o?p():"0px",...i?.(),...s?.()}},exports.getItemWrapperStyles=t=>{let{itemBackgroundColor:l,itemBorderStyle:o,itemCorner:a,itemShadow:i,hasItemShadow:s,itemStyle:p}=t||{};return{...e.getGlobalColorResponsiveStyle("bg",l),...e.getRadiusStyleActiveState({...a,active:{...a||{},radiusType:"custom"}}),...p,...e.getStyleShadow({value:i,styleAppliedFor:"box-shadow",isEnableShadow:s}),...e.makeStyle({b:o?.border,bw:o?.width,bc:e.getSingleColorVariable(o?.color)})}},exports.getMarqueeBaseStyle=e=>{let{play:t,direction:o,delay:a,loop:i,autoFill:s}=e||{};return{"--play":t?"running":"paused","--direction":"left"===o?"normal":"reverse","--delay":`${a}s`,"--iteration-count":i?`${i}`:"infinite","--min-width":s?"auto":"100%",...l(e?.isFullWidthResponsive)}},exports.getMarqueeStyles=t=>{let{setting:l,styles:o,itemSize:a=0}=t||{},{sizeSetting:i,iconSeparatorSize:s,itemSpacing:p}=o||{},{itemWidthType:n,isShowIconSeparator:r,iconSeparatorSvg:b}=l||{},m=e.makeStyleResponsive("h",e.getHeightByShapeGlobalSize(i)),g=e.makeStyleWithDefault("w",e.getWidthByShapeGlobalSize(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),d=t=>{let l=e.getResponsiveValueByScreen(o?.itemMaxWidth,t),i=parseInt(l??"0");l=Math.max(i,40)+"px";let s=e.getResponsiveValueByScreen(n,t);return"FIT_CONTENT"===s&&(l="auto"),"BASE_ON_NUMBER_OF_ITEMS"===s&&(l=`calc(100% / ${a})`),l},u=e=>"auto"===d(e)?"unset":d(e),S=t=>{let l=e.getResponsiveValueByScreen(p,t);return l??"0px"},y=r&&b,c=(t,l)=>{let i=e.getResponsiveValueByScreen(o?.itemSpacing,t),s=0>parseInt(i||"0")?"0px":i??"0px";return y?"0px":l<a&&s||"0px"};return{styleHeight:m,styleWidth:g,getIconPosition:()=>({...e.makeStyleResponsive("ml",{desktop:S("desktop"),tablet:S("tablet"),mobile:S("mobile")}),...e.makeStyleResponsive("mr",{desktop:S("desktop"),tablet:S("tablet"),mobile:S("mobile")})}),getWidthOfIconSeparatorSize:()=>({...e.makeStyleResponsive("w",{desktop:`${e.getValueByDevice(s,"desktop")||0}px`,tablet:`${e.getValueByDevice(s,"tablet")||0}px`,mobile:`${e.getValueByDevice(s,"mobile")||0}px`}),...e.makeStyleResponsive("minw",{desktop:`${e.getValueByDevice(s,"desktop")||0}px`,tablet:`${e.getValueByDevice(s,"tablet")||0}px`,mobile:`${e.getValueByDevice(s,"mobile")||0}px`})}),getHeightOfIconSeparatorSize:()=>e.makeStyleResponsive("h",{desktop:`${e.getValueByDevice(s,"desktop")||0}px`,tablet:`${e.getValueByDevice(s,"tablet")||0}px`,mobile:`${e.getValueByDevice(s,"mobile")||0}px`}),getWidthForWrapperItem:()=>({...e.makeStyleResponsive("w",{desktop:d("desktop"),tablet:d("tablet"),mobile:d("mobile")}),...e.makeStyleResponsive("minw",{desktop:d("desktop"),tablet:d("tablet"),mobile:d("mobile")}),...e.makeStyleResponsive("maxw",{desktop:u("desktop"),tablet:u("tablet"),mobile:u("mobile")})}),getItemPaddingRightSpacingValue:t=>({...e.makeStyleResponsive("pr",{desktop:c("desktop",t),tablet:c("tablet",t),mobile:c("mobile",t)})}),getWidthForItem:()=>e.makeStyleResponsive("w",{desktop:"calc(100%)",tablet:"calc(100%)",mobile:"calc(100%)"})}},exports.getWidthMarquee=l;
