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