"use strict";var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers=require("../../../common/helpers.js");const getStyle=(e,t)=>{let{style:r,contentType:a,parentStyle:o,parentSettings:s,background:n,customStyle:l}=e,d=core.makeGlobalSize(o?.itemPadding),i=core.DEVICES.reduce((e,r)=>{if("edit"===t)return{};let a=s?.rtl,n=a?"ml":"mr",l=core.getResponsiveValueByScreen(o?.spacing,r);return l?{...e,[`--${n}${"desktop"!==r?`-${r}`:""}`]:l+"px"}:{...e}},{}),c=()=>{let e=["--radius"];return(e.forEach(e=>{delete r?.[e]}),"productImage"===a)?r:{...r,...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"}})}},k={...l,...d&&d.padding,...helpers.getInitialWidthForCarouselItem({spacing:o?.spacing,slidesToShow:s?.itemNumber??s?.slidesToShow,sneakPeak:s?.sneakPeak,sneakPeakType:s?.sneakPeakType,sneakPeakOffsetCenter:s?.sneakPeakOffsetCenter,sneakPeakOffsetForward:s?.sneakPeakOffsetForward,vertical:s?.vertical}),...core.getStyleBackgroundByDevice(n),...core.getGradientBgrStyleByDevice(n,{desktop:!0,tablet:!0,mobile:!0})},u=system.createStyle({...core.getStyleShadow({value:o?.carouselShadow,styleAppliedFor:"box-shadow",isEnableShadow:o?.hasActiveShadow})}),g=system.createStyle({...k,...c(),...i});return{carouselItemStyle:g,carouselItemInnerStyle:u}};exports.getStyle=getStyle;
