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