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