"use strict";var core=require("@gem-sdk/core");const getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,l=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:l}},getArrowPositionStyle=({vertical:e,arrowType:t,gapToEachSize:o,left:l})=>{let i={};return core.DEVICES.forEach(r=>{let a=core.getResponsiveValueByScreen(e,r,!1),p="desktop"===r?"":`-${r}`;a?(i[`top${p}`]="inside"===t[r]&&l?o+"px":"initial",i[`left${p}`]=l?"initial":"",i[`bottom${p}`]="inside"!==t[r]||l?"initial":o+"px",i[`right${p}`]=l?"":"initial"):(l?(i[`left${p}`]="inside"===t[r]?o+"px":"3px",i[`right${p}`]="initial"):(i[`right${p}`]="inside"===t[r]?o+"px":"3px",i[`left${p}`]="initial"),i[`top${p}`]=l?"initial":"",i[`bottom${p}`]=l?"":"initial")}),i},getClassArrowRotate=(e,t)=>{let o={},l={vertical:{left:{desktop:"gp-rotate-[-90deg]",tablet:"tablet:gp-rotate-[-90deg]",mobile:"mobile:gp-rotate-[-90deg]"},right:{desktop:"gp-rotate-90",tablet:"tablet:gp-rotate-90",mobile:"mobile:gp-rotate-90"}},horizontal:{left:{desktop:"gp-rotate-180",tablet:"tablet:gp-rotate-180",mobile:"mobile:gp-rotate-180"},right:{desktop:"gp-rotate-0",tablet:"tablet:gp-rotate-0",mobile:"mobile:gp-rotate-0"}}};return core.DEVICES.forEach(i=>{let r=core.getResponsiveValueByScreen(t,i,!1),a=r?"vertical":"horizontal",p=e?"left":"right",s=l[a][p][i];o[s]=!0}),o},getClassArrowDisplay=e=>{let t={inside:{desktop:"!gp-flex !gp-absolute gp-z-2",tablet:"tablet:!gp-flex tablet:!gp-absolute tablet:gp-z-2",mobile:"mobile:!gp-flex mobile:!gp-absolute mobile:gp-z-2"},outside:{desktop:"!gp-flex !gp-relative",tablet:"tablet:!gp-flex tablet:!gp-relative",mobile:"mobile:!gp-flex mobile:!gp-relative"},none:{desktop:"!gp-hidden",tablet:"tablet:!gp-hidden",mobile:"mobile:!gp-hidden"}},o={};return core.DEVICES.forEach(l=>{let i=e?.[l];i&&t[i]||(i="none");let r=t[i][l];o[r]=!0}),o},getArrowDisplayStyle=e=>{let t={};return core.DEVICES.forEach(o=>{let l=core.getResponsiveValueByScreen(e,o,"none");t={...t,[o]:"none"===l?"none":"flex"}}),t},mappingNavigationCarousel=e=>{let t=e=>{let t={...e},o=core.DEVICES.filter(e=>!Object.keys(t).includes(e));return o.forEach(e=>{"tablet"===e&&(t[e]=t.desktop),"mobile"===e&&(t[e]=t.tablet)}),t};if(e?.layout==="vertical"){let{controlOverContent:o,arrow:l}=e,i=t(l),r=t(o),a={};return core.DEVICES.forEach(e=>{i[e]?i[e]&&r[e]?a[e]="inside":a[e]="outside":a[e]="none"}),{...e,navigationStyle:a}}return e},getData=e=>{let t=!!e.custom&&""!==e.custom;return{isRenderCustomIcon:t}};exports.getArrowDisplayStyle=getArrowDisplayStyle,exports.getArrowPositionStyle=getArrowPositionStyle,exports.getClassArrowDisplay=getClassArrowDisplay,exports.getClassArrowRotate=getClassArrowRotate,exports.getData=getData,exports.getResponsiveSetting=getResponsiveSetting,exports.mappingNavigationCarousel=mappingNavigationCarousel;
