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