import{makeStyleResponsive as e,getCornerCSSFromGlobal as t,makeStyle as o,getStyleShadow as l,getResponsiveStyleShadowWithoutState as i,getResponsiveStylePadding as a,composeTypographyStyle as r,composeBorderResponsive as n,composeBorderCss as d,composeCornerCss as s}from"@gem-sdk/core";import{FLEX_ALIGN as p,generateTranslateByDevices as b,getLabelPosition as g}from"./helpers.js";let x=({width:t,leftImageWidth:o=0,rightImageWidth:l=0})=>{let i=e("w",{desktop:t?.desktop??"0",tablet:t?.tablet??t?.desktop??"0",mobile:t?.mobile??t?.tablet??t?.desktop??"0"});for(let e in i)i[e]="undefinedpx"!==i[e]&&i[e]?i[e]:`${Math.min(o,l)||900}px`;return i},h=({aspectRatio:o,builderData:l,allImagesLoaded:i=!0})=>({height:"auto",overflow:"hidden",position:"relative","box-sizing":"border-box",display:i?"block":"none",...e("aspect",o),...t(l?.advanced?.rounded)}),m=t=>{let o={desktop:p[t?.align?.desktop??"left"],tablet:p[t?.align?.tablet??t?.align?.desktop??"left"],mobile:p[t?.align?.mobile??t?.align?.tablet??t?.align?.desktop??"left"]};return{...e("jc",o)}},c=({type:t,styles:d,isHorizontal:s})=>{let p=s?{["left"===t?"left":"right"]:"8px"}:{["left"===t?"top":"bottom"]:"8px"},x=b({isHorizontal:s,labelPositionHoz:d?.labelPositionHoz,labelPositionVer:d?.labelPositionVer}),h=e=>g({position:e,isHorizontal:s,labelPositionHoz:d?.labelPositionHoz,labelPositionVer:d?.labelPositionVer});return e(s?"top":"left",h("topLeft")),{opacity:1,...p,...n(d?.labelBorder),...r(d?.typo),...e("t",x),...a(d?.labelPadding),...e(s?"top":"left",h("topLeft")),...e(s?"bottom":"right",h("bottomRight")),...i(d?.labelShadow,"box-shadow",d?.labelShadow),...l({styleAppliedFor:"text-shadow",value:d?.typo?.custom?.textShadow,isEnableShadow:d?.typo?.custom?.hasShadowText}),...e("bg",d?.labelBackgroundColor),...o({c:d?.labelTextColor??"#F9F9F9"})}},u=({type:t,props:o})=>{let{styles:l,leftImageCss:i,rightImageCss:a}=o??{};return{top:0,width:"100%",height:"100%",display:"block",position:"absolute",..."left"===t?i:a,...e("objf",l?.imageScale)}},f=(e,t)=>{let o=`
    #image-comparison-left-label-${t} div, #image-comparison-right-label-${t} div {
      ${d(e?.labelBorder?.desktop)}
      ${s(e?.labelRounded?.desktop)}
    }

    @media only screen and (max-width: 1024px) and (min-width: 768px) {
      #image-comparison-left-label-${t} div, #image-comparison-right-label-${t} div {
        ${d(e?.labelBorder?.tablet)}
        ${s(e?.labelRounded?.tablet)}
      }
    }

    @media only screen and (max-width: 767px) {
      #image-comparison-left-label-${t} div, #image-comparison-right-label-${t} div {
        ${d(e?.labelBorder?.mobile)}
        ${s(e?.labelRounded?.mobile)}
      }
    }
  `;return o},y=(e,t)=>f(e,t),w=t=>({"--pos":"static","--op":0,...e("aspect",t)}),S=e=>{let{hover:t,isHorizontal:o}=e;return t?"pointer":o?"ew-resize":"ns-resize"},z=e=>({"z-index":2,display:"flex",position:"absolute","align-items":"center","justify-content":"center",cursor:S(e),"flex-direction":e.isHorizontal?"column":"row",height:e.isHorizontal?"100%":`${e.handleSize}px`,width:e.isHorizontal?`${e.handleSize}px`:"100%"}),$=e=>({display:"block",flex:"0 1 auto",background:e.sliderLineColor,"box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.40)",height:e.isHorizontal?"100%":`${e.sliderLineWidth}px`,width:e.isHorizontal?`${e.sliderLineWidth}px`:"100%"}),k=e=>({display:"flex",flex:"1 0 auto","align-items":"center","box-sizing":"border-box","justify-content":"center","border-radius":"100%",width:`${e.handleSize}px`,height:`${e.handleSize}px`,"box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.40)",transform:e.isHorizontal?"none":"rotate(90deg)",border:`${e.sliderLineWidth}px solid ${e.sliderLineColor}`}),H=()=>({width:"auto",height:"auto",display:"flex",flex:"1 0 auto","align-items":"center","box-sizing":"border-box","justify-content":"center"}),L=e=>({filter:"drop-shadow(rgba(0, 0, 0, 0.4) 0px 0px 4px)",margin:"left"===e.type?"0 2px 0 0":"0 0 0 2px"});export{L as getArrowStyles,h as getContainerStyles,H as getHandleCustomStyles,k as getHandleStyles,u as getImageStyles,f as getInnerBorderCss,y as getLabelCustomCss,c as getLabelStyles,w as getLazyPlaceholderStyle,$ as getLineStyles,m as getOuterWrapperStyles,S as getSliderCursorStyles,z as getSliderStyles,x as getWrapperWidth};
