import{getResponsiveValueByScreen as e,cls as t}from"@gem-sdk/core";import{getDisplayStyle as o}from"./common.js";import{convertUnitToNumber as i}from"../../product-images/common/productFeaturedImage.js";let a=t=>o(o=>!e(t,o),"flex"),l=["right","left","inside-left","inside-right"],s={desktop:{shape:"square",shapeValue:"1/1",width:"20%",height:void 0,shapeLinked:!0}},r=t=>{let o={};return["desktop","mobile","tablet"].forEach(i=>{let a=e(t,i),s=l.includes(a);o=s?{...o,[i]:!0}:{...o,[i]:!1}}),o},n=(o,i)=>{let a=r(o),l={};return["desktop","mobile","tablet"].forEach(t=>{let o=e(i,t),s="desktop"===t?"":`${t}:`;l[`${s}!gp-min-h-0`]=!!a[t]&&"outside"===o,l[`${s}!gp-min-h-full`]=!(a[t]&&"outside"===o)}),t({...l})},p=(t,o,i)=>{let a=r(o),l=e(i,t);return a[t]&&"outside"===l?"!gp-min-h-0":"!gp-min-h-full"},d=()=>({desktop:!0,tablet:!0,mobile:!0}),h=()=>({desktop:"none",tablet:"none",mobile:"none"}),c=t=>{let o={};return["desktop","mobile","tablet"].forEach(i=>{let a=e(t.shapeByLayout,i)?.width,l=e(t.itemSpacing,i),s=0;a?.includes("%")&&(s=100/parseInt(a)),o={...o,[i]:s?`calc(${a} - ${l} * ${s-1} / ${s})`:a}}),o},m=t=>{let o={};return["desktop","mobile","tablet"].forEach(i=>{let a=e(t.position,i),l=e(t.shapeByLayout,i)?.width;o={...o,[i]:"bottom-center"===a&&l?.includes("px")?l:"100%"}}),o},u=t=>{let o={};return["desktop","mobile","tablet"].forEach(a=>{let l=e(t.position,a),s=i(e(t.spacing,a),5),r=e(t.shapeByLayout,a)?.width,n="100%";if("bottom-center"===l||"inside-bottom"===l){let e=100/i(r,20);n=r?.includes("px")?r:r?.includes("%")?`calc(${r} - ${(e-1)*s/e}px)`:"100%"}o={...o,[a]:n}}),o},b=t=>{let o={desktop:!0,tablet:!0,mobile:!0};return["desktop","mobile","tablet"].forEach(i=>{let a=e(t.shapeByLayout,i)?.width??"100%",l=0!==parseInt(a);o={...o,[i]:l}}),o},g=(t,o)=>{let i={desktop:"auto",tablet:"auto",mobile:"auto"};return["desktop","mobile","tablet"].forEach(a=>{let l=e(o,a),s=e(t,a)?.width,r="auto";s?.includes("%")&&(r=100>parseInt(s)?100/parseInt(s):"auto"),i={...i,[a]:"bottom-center"===l||"inside-bottom"===l?r:"auto"}}),i},f=(t,o)=>{let i={};return["desktop","mobile","tablet"].forEach(a=>{let l=e(o,a);switch(l){case"bottom-center":case"bottom-left":i={...i,[a]:e(t.shapeForBottom,a)};break;case"inside-bottom":i={...i,[a]:e(t.shapeForInsideBottom??s,a)};break;case"left":case"right":i={...i,[a]:e(t.shape,a)};break;case"inside-left":case"inside-right":i={...i,[a]:e(t.shapeForInside??s,a)};break;case"only-feature":i={...i,[a]:e(t.shapeForFtOnly,a)};break;case"one-col":i={...i,[a]:e(t.shapeFor1Col,a)};break;case"two-col":i={...i,[a]:e(t.shapeFor2Col,a)}}}),i};export{l as HORIZONTAL_LAYOUT,b as checkDisplayGalleryByWidth,d as getAllowDotConfig,r as getCarouselVerticalConfigByPosition,h as getDotStyleConfig,p as getEditorMinHeightClass,n as getMinHeightByPosition,u as getSettingMinWidthForCarouselItem,m as getSettingWidthForCarouselItem,c as getSettingWidthForGridItem,f as getShapeByLayout,g as getSliderPerShowConfig,a as getZoomDisplay,s as sizeSettingDefaultForNewLayout};
