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