import{getResponsiveValueByScreen as o}from"@gem-sdk/core";import{getDotStyleConfig as t,getCarouselVerticalConfigByPosition as r,getAllowDotConfig as a}from"./productGallery.js";import{getDotStyleForOnlyFeaturedImage as e}from"./productFeaturedImage.js";let DEVICES=["desktop","mobile","tablet"],getGalleryCarouselSettingAttr=a=>{let e={desktop:"inside"===o(a.navigationPosition,"desktop"),tablet:"inside"===o(a.navigationPosition,"tablet"),mobile:"inside"===o(a.navigationPosition,"mobile")},i=DEVICES.reduce((o,t)=>(a.navigationPosition?.[t]&&(o[t]="none"!==a.navigationPosition[t]),o),{});return{...a?.loop&&{loop:a.loop},itemNumber:{desktop:"auto",tablet:"auto",mobile:"auto"},dot:{desktop:!1,tablet:!1,mobile:!1},dotStyle:t(),controlOverContent:e,...a?.dragToScroll&&{enableDrag:{desktop:a.dragToScroll,tablet:a.dragToScroll,mobile:a.dragToScroll}},vertical:r(a.position),...a?.arrowIcon&&{arrowCustom:a.arrowIcon},arrowIconSize:a.arrowIconSize||{desktop:24},...a?.arrowIconColor&&{arrowCustomColor:a.arrowIconColor},...a?.arrowNavColor&&{arrowBackgroundColor:a.arrowNavColor},...a?.arrowNavBorder&&{arrowBorder:{desktop:a.arrowNavBorder}},...a?.arrowNavRadius&&{roundedArrow:{desktop:a.arrowNavRadius}},...a?.arrowNavShadow&&{arrowShadow:{desktop:a.arrowNavShadow}},arrowGapToEachSide:"16",navigationStyle:a.navigationPosition,navigationEnable:i,arrowButtonSize:{desktop:{width:a.arrowNavSize?.width,height:a.arrowNavSize?.height,padding:a.arrowNavSize?.padding}},animationMode:a?.ftAnimationMode,enableAction:{desktop:!0}}},getFeaturedCarouselSettingAttr=t=>{let r={desktop:"inside"===o(t.ftNavigationPosition,"desktop"),tablet:"inside"===o(t.ftNavigationPosition,"tablet"),mobile:"inside"===o(t.ftNavigationPosition,"mobile")},i=DEVICES.reduce((o,r)=>(t.ftNavigationPosition?.[r]&&(o[r]="none"!==t.ftNavigationPosition[r]),o),{});return{...t?.ftLoop&&{loop:t.ftLoop},itemNumber:{desktop:1},dot:a(),dotStyle:e({position:t.position,dotStyle:t.ftDotStyle}),dotSize:t.ftDotSize??{desktop:12},dotGapToCarousel:t.ftDotGapToCarousel??{desktop:16},dotColor:t.ftDotColor??{desktop:"bg-1"},dotActiveColor:t.ftDotActiveColor??{desktop:"line-3"},controlOverContent:r,...t?.ftDragToScroll&&{enableDrag:{desktop:t.ftDragToScroll,tablet:t.ftDragToScroll,mobile:t.ftDragToScroll}},...t?.ftArrowIcon&&{arrowCustom:t.ftArrowIcon},arrowIconSize:t.ftArrowIconSize||{desktop:24},...t?.ftArrowIconColor&&{arrowCustomColor:t.ftArrowIconColor},...t?.ftArrowNavColor&&{arrowBackgroundColor:t.ftArrowNavColor},...t?.ftArrowNavBorder&&{arrowBorder:{desktop:t.ftArrowNavBorder}},...t?.ftArrowNavRadius&&{roundedArrow:{desktop:t.ftArrowNavRadius}},...t?.ftArrowNavShadow&&{arrowShadow:{desktop:t.ftArrowNavShadow}},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",animationMode:t?.ftAnimationMode,...t?.ftNavigationPosition&&{navigationStyle:t.ftNavigationPosition},navigationEnable:i,arrowButtonSize:{desktop:{width:t.ftArrowNavSize?.width,height:t.ftArrowNavSize?.height,padding:t.ftArrowNavSize?.padding}},enableAction:{desktop:!0}}};export{getFeaturedCarouselSettingAttr,getGalleryCarouselSettingAttr};
