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