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