"use strict";var core=require("@gem-sdk/core");const getResponsiveSetting=e=>{let t=e.desktop,o=e.tablet?e.tablet:t,i=e.mobile?e.mobile:o;return{desktop:t,tablet:o,mobile:i}},getArrowPositionStyle=({vertical:e,arrowType:t,gapToEachSize:o,left:i})=>{let l={};return core.DEVICES.forEach(a=>{let r=core.getResponsiveValueByScreen(e,a,!1),s="desktop"===a?"":`-${a}`;r?(l[`top${s}`]="inside"===t[a]&&i?o+"px":"initial",l[`left${s}`]=i?"initial":"",l[`bottom${s}`]="inside"!==t[a]||i?"initial":o+"px",l[`right${s}`]=i?"":"initial"):(i?(l[`left${s}`]="inside"===t[a]?o+"px":"3px",l[`right${s}`]="initial"):(l[`right${s}`]="inside"===t[a]?o+"px":"3px",l[`left${s}`]="initial"),l[`top${s}`]=i?"initial":"",l[`bottom${s}`]=i?"":"initial")}),l},getClassArrowRotate=(e,t)=>{let o={},i={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(l=>{let a=core.getResponsiveValueByScreen(t,l,!1),r=a?"vertical":"horizontal",s=e?"left":"right",p=i[r][s][l];o[p]=!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(i=>{let l=e?.[i];l&&t[l]||(l="none");let a=t[l][i];o[a]=!0}),o},getArrowDisplayStyle=e=>{let t={};return core.DEVICES.forEach(o=>{let i=core.getResponsiveValueByScreen(e,o,"none");t={...t,[o]:"none"===i?"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:i}=e,l=t(i),a=t(o),r={};return core.DEVICES.forEach(e=>{l[e]?l[e]&&a[e]?r[e]="inside":r[e]="outside":r[e]="none"}),{...e,navigationStyle:r}}return e},getData=e=>{let t=!!e.custom&&""!==e.custom;return{isRenderCustomIcon:t}},getResponsiveSizeValue=(e,t,o)=>{for(let i of({mobile:["mobile","tablet","desktop"],tablet:["tablet","desktop"],desktop:["desktop"]})[t]){let t=e?.[i]?.[o];if(void 0!==t)return""===t?"auto":t}return"auto"},getResponsiveWidth=e=>({"--w":getResponsiveSizeValue(e,"desktop","width"),"--w-tablet":getResponsiveSizeValue(e,"tablet","width"),"--w-mobile":getResponsiveSizeValue(e,"mobile","width")}),getResponsiveHeight=e=>({"--h":getResponsiveSizeValue(e,"desktop","height"),"--h-tablet":getResponsiveSizeValue(e,"tablet","height"),"--h-mobile":getResponsiveSizeValue(e,"mobile","height")});exports.getArrowDisplayStyle=getArrowDisplayStyle,exports.getArrowPositionStyle=getArrowPositionStyle,exports.getClassArrowDisplay=getClassArrowDisplay,exports.getClassArrowRotate=getClassArrowRotate,exports.getData=getData,exports.getResponsiveHeight=getResponsiveHeight,exports.getResponsiveSetting=getResponsiveSetting,exports.getResponsiveWidth=getResponsiveWidth,exports.mappingNavigationCarousel=mappingNavigationCarousel;
