import{splitStyle as o,makeGlobalSize as e,makeStyleResponsive as t,getBgByDevice as r,getResponsiveValueByScreen as s,makeStyle as d,getSingleColorVariable as m,getRadiusStyleActiveState as i,getStyleShadow as a,getStyleBackgroundByDevice as l,getGradientBgrStyleByDevice as n}from"@gem-sdk/core";import{createStyle as b}from"@gem-sdk/system";import{createStyleObject as c}from"../../../../grid/components/row/common/helpers.js";import{getInitialWidthForCarouselItem as p}from"../../../../carousel-v3/common/helpers.js";let getStyle=g=>{let{setting:h,styles:w,style:u}=g,{background:S}=h??{},[k,f]=o(["pos","top","left","bottom","right","z","mb","mt","mb","ml","mr","d"],u),T=e(w?.itemPadding),C=b({...k}),v=b({...t("jc",w?.align||{desktop:"center"})}),x=b({...f,...t("w",c(w?.width).content),...r({backgroundColor:w?.backgroundColor,backgroundImage:w?.backgroundImage})}),y=b({...!h?.sameHeight&&t("rg",w?.horizontalGutter),...t("cg",w?.verticalGutter),...t("gtc",{desktop:`repeat(${s(h?.slidesToShow,"desktop")}, minmax(0, 1fr))`,tablet:h?.slidesToShow?.tablet&&`repeat(${s(h?.slidesToShow,"tablet")}, minmax(0, 1fr))`,mobile:h?.slidesToShow?.mobile&&`repeat(${s(h?.slidesToShow,"mobile")}, minmax(0, 1fr))`})}),j=b({...p({spacing:w?.spacing,slidesToShow:h?.slidesToShow})}),$={...T&&T.padding,...d({bs:w?.borderContent?.border,bw:w?.borderContent?.width,bc:m(w?.borderContent?.color)}),...i({...w?.roundedContent,active:{...w?.roundedContent||{},radiusType:"custom"}}),...a({value:w?.carouselShadow,styleAppliedFor:"box-shadow",isEnableShadow:w?.hasActiveShadow}),...l(S),...n(S,{desktop:!0,tablet:!0,mobile:!0})},z=b({...$});return{gridLayoutStyle:y,carouselItemStyle:j,productListWrapStyle:C,productListContentStyle:x,productListWrapAlignStyle:v,productItemStyle:z}};export{getStyle};
