import{getResponsiveValueByScreen as o}from"@gem-sdk/core";import{getShapeByLayout as t,getSliderPerShowConfig as r,getCarouselVerticalConfigByPosition as e,getDotStyleConfig as a,getAllowDotConfig as i}from"./productGallery.js";import{getDotStyleForOnlyFeaturedImage as n}from"./productFeaturedImage.js";let d=["desktop","mobile","tablet"],s=i=>{let n=t({shape:i.shape,shapeForBottom:i.shapeForBottom,shapeFor1Col:i.shapeFor1Col,shapeFor2Col:i.shapeFor2Col,shapeForFtOnly:i.shapeForFtOnly,shapeForInsideBottom:i.shapeForInsideBottom,shapeForInside:i.shapeForInside},i.position),s=r(n,i.position),l={desktop:"inside"===o(i.navigationPosition,"desktop"),tablet:"inside"===o(i.navigationPosition,"tablet"),mobile:"inside"===o(i.navigationPosition,"mobile")},p=d.reduce((o,t)=>(i.navigationPosition?.[t]&&(o[t]="none"!==i.navigationPosition[t]),o),{});return{...i?.loop&&{loop:i.loop},itemNumber:s,dot:{desktop:!1,tablet:!1,mobile:!1},dotStyle:a(),controlOverContent:l,...i?.dragToScroll&&{enableDrag:{desktop:i.dragToScroll,tablet:i.dragToScroll,mobile:i.dragToScroll}},vertical:e(i.position),...i?.arrowIcon&&{arrowCustom:i.arrowIcon},arrowIconSize:i.arrowIconSize||{desktop:24},...i?.arrowIconColor&&{arrowCustomColor:i.arrowIconColor},...i?.arrowNavColor&&{arrowBackgroundColor:i.arrowNavColor},...i?.arrowNavBorder&&{arrowBorder:{desktop:i.arrowNavBorder}},...i?.arrowNavRadius&&{roundedArrow:{desktop:i.arrowNavRadius}},...i?.arrowNavShadow&&{arrowShadow:{desktop:i.arrowNavShadow}},sneakPeakType:{desktop:"center"},arrowGapToEachSide:"16",navigationStyle:i.navigationPosition,navigationEnable:p,arrowButtonSize:{desktop:{width:void 0,height:void 0}},animationMode:i?.ftAnimationMode,enableAction:{desktop:!0}}},l=t=>{let r={desktop:"inside"===o(t.ftNavigationPosition,"desktop"),tablet:"inside"===o(t.ftNavigationPosition,"tablet"),mobile:"inside"===o(t.ftNavigationPosition,"mobile")},e=d.reduce((o,r)=>(t.ftNavigationPosition?.[r]&&(o[r]="none"!==t.ftNavigationPosition[r]),o),{});return{...t?.ftLoop&&{loop:t.ftLoop},itemNumber:{desktop:1},dot:i(),dotStyle:n({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:e,arrowButtonSize:{desktop:{width:void 0,height:void 0}},enableAction:{desktop:!0}}};export{l as getFeaturedCarouselSettingAttr,s as getGalleryCarouselSettingAttr};
