'use client';
import{makeStyleResponsive as e,getValueByDevice as t,isEmptyChildren as o,splitStyle as r,composeRadius as p,makeStyle as i,getGradientBgrStyleByDevice as d,getStyleBackgroundByDevice as l,composeGridLayout as n}from"@gem-sdk/core";import{createStyle as a}from"@gem-sdk/system";import{getInnerRadiusExcludeBorder as m,createStyleObject as s}from"./helpers.js";import{postPurchaseViewSpacing as b}from"../../../../post-purchase/common/helper.js";let g=({rowProps:g,isPostPurchase:u,type:c="React",translatedBackground:f})=>{let{children:h,setting:k,builderProps:x,styles:v,style:w,advanced:y,isNotFullWidth:j,parentStyle:R}=g,{isSection:S,layout:T,horizontalAlign:q,responsive:L,inlineAlignment:O}=k??{},{width:z,columnGap:C,rowGap:D,background:H,verticalGutter:Y,verticalGutterMobile:A,enablePagePadding:B,height:E}=v??{},F=m(y?.border,y?.rounded),G=(e,t)=>{let o=e?.normal,r=t?.normal;if(!o||!r||r?.borderType=="none"||"square"===o.radiusType||"none"===o.radiusType)return!1;for(let e in o)if(Object.hasOwn(o,e)&&"0px"!==o[e])return!0;return!1},I=e("of",{desktop:G(F.desktop,t(y?.border,"desktop"))?"hidden":void 0,tablet:G(F.tablet,t(y?.border,"tablet"))?"hidden":void 0,mobile:G(F.mobile,t(y?.border,"mobile"))?"hidden":void 0}),J=x?.builderData?.childrens?.length,K={...e("aspect",{desktop:"16/9"})},M=o(h)||!J,N={desktop:z?.desktop==="default"?"1200px":z?.desktop,tablet:z?.tablet==="default"?"1200px":z?.tablet,mobile:z?.mobile==="default"?"1200px":z?.mobile},P=s(u?N:z),[Q,U]=r(["pos","top","left","bottom","right","z"],w),V=()=>({...S?U:w,...e("cg",Y),...e("rg",A),...T?n(T):e("gtc",L),...e("w",P.content),...e("h",E),...S?{}:I}),W=()=>({"--mb":"0px","--mt":"0px",...e("cg",C),...i({pc:O,rg:D?b[D]:"0px"})}),X=t=>{let o=H;return"Liquid"===c&&(o=f),{...l(o,t),...d(o,{desktop:!0,tablet:!0,mobile:!0}),...e("pc",q)}},Z=()=>j&&!M?{marginLeft:"0px",marginRight:"0px"}:{},$=a({...{...p(F)}}),_=a({...K,"pointer-events":"none",transform:"translateY(-50%)",height:"100%","object-fit":"cover",top:"50%"}),ee=e=>{if(void 0!==e)return e?"var(--g-ct-p, 15px)":"none"},et={desktop:ee(B?.desktop),tablet:ee(B?.tablet),mobile:ee(B?.mobile)},eo=a({...Q,...e("w",P.wrapper),...e("pl",et),...e("pr",et)});return{embedVideoStyle:_,backgroundBoxStyle:$,rowStyle:(e=!1)=>a({...V(),...X(),...Z(),...e?W():{},...k?.sameHeightSubgridContainer&&R}),sectionStyle:eo}};export{g as getRowStyle};
