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