import{makeGlobalSize as e,DEVICES as t,getResponsiveValueByScreen as r,getGradientBgrStyleByDevice as o,getStyleBackgroundByDevice as a,getStyleShadow as s,getRadiusStyleActiveState as d,makeStyle as n,getSingleColorVariable as i}from"@gem-sdk/core";import{createStyle as k}from"@gem-sdk/system";import{getInitialWidthForCarouselItem as l}from"../../../common/helpers.js";let m=(m,p)=>{let{style:c,contentType:f,parentStyle:u,parentSettings:b,background:h,customStyle:w}=m,g=e(u?.itemPadding),P=t.reduce((e,t)=>{if("edit"===p)return{};let o=b?.rtl,a=r(u?.spacing,t);return a?{...e,[`--${o?"ml":"mr"}${"desktop"!==t?`-${t}`:""}`]:a+"px"}:{...e}},{}),C={...w,...g&&g.padding,...l({spacing:u?.spacing,slidesToShow:b?.itemNumber??b?.slidesToShow,sneakPeak:b?.sneakPeak,sneakPeakType:b?.sneakPeakType,sneakPeakOffsetCenter:b?.sneakPeakOffsetCenter,sneakPeakOffsetForward:b?.sneakPeakOffsetForward,vertical:b?.vertical}),...a(h),...o(h,{desktop:!0,tablet:!0,mobile:!0})},y=k({...s({value:u?.carouselShadow,styleAppliedFor:"box-shadow",isEnableShadow:u?.hasActiveShadow})}),S=k({...C,...(["--radius"].forEach(e=>{delete c?.[e]}),"productImage"===f)?c:{...c,...n({bs:u?.borderContent?.border,bw:u?.borderContent?.width,bc:i(u?.borderContent?.color)}),...d({...u?.roundedContent,active:{...u?.roundedContent||{},radiusType:"custom"}})},...P});return{carouselItemStyle:S,carouselItemInnerStyle:y}};export{m as getStyle};
