"use strict";var core=require("@gem-sdk/core"),helpers=require("./helpers.js");const getContainerStyles=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getWrapperStyles=e=>({"border-radius":"inherit",...core.makeStyleResponsive("jc",e?.align)}),getImageStyles=(e,t)=>{let{wrapperBorder:s,borderRadius:r}=e??{};return{...getImageWidth(e),...getImageHeight(e),...core.getBorderStyle(s),...core.getBorderRadiusStyle(r),...helpers.overwriteDefaultRadius(t?.builderData?.advanced?.rounded),...core.getStyleShadow({value:e?.shadow,styleAppliedFor:"box-shadow",isEnableShadow:e?.shadow?.enable&&e?.shadow?.type!=="none"})}},getNextImageStyles=({width:e,height:t,setting:s,isDisableObjectFit:r,isDisableAspectStyle:a})=>{let{layout:i,aspectRatio:l}=s??{},o=helpers.getResponsiveObjectFit({layout:i,isDisableObjectFit:r}),g=helpers.getAspectRatioNextImage({isDisableAspectStyle:a,objectFits:o,aspectRatio:l,width:e,height:t});return{...core.makeStyleResponsive("aspect",g),...o}},getAdaptiveImageStyles=({layout:e,aspectRatio:t,borderRadius:s})=>{let r=helpers.getResponsiveObjectFit({layout:e,isDisableObjectFit:!1});return{...core.makeStyleResponsiveState("radius",s),...core.makeStyleResponsive("aspect",t),...r}},getAdaptivePictureStyles=()=>({"border-radius":"inherit"}),getImageWidth=e=>{let t=e?.shape?core.makeStyleResponsive("w",core.getWidthByShapeGlobalSize(e.shape)):core.makeStyleResponsive("w",core.makeWidth(e?.width,e?.fullWidth));return t},getImageHeight=e=>core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(e?.shape));exports.getAdaptiveImageStyles=getAdaptiveImageStyles,exports.getAdaptivePictureStyles=getAdaptivePictureStyles,exports.getContainerStyles=getContainerStyles,exports.getImageStyles=getImageStyles,exports.getNextImageStyles=getNextImageStyles,exports.getWrapperStyles=getWrapperStyles;
