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