'use client';
import{makeStyleResponsive as e,getValueByDevice as t,isEmptyChildren as o,splitStyle as r,composeRadius as p,composeGridLayout as i,makeStyle as l,getStyleBackgroundByDevice as d,getGradientBgrStyleByDevice 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 getRowStyle=(g,f)=>{let{children:u,setting:c,builderProps:h,styles:k,style:x,advanced:v,isNotFullWidth:w,parentStyle:y}=g,{isSection:j,layout:R,horizontalAlign:S,responsive:T,inlineAlignment:O}=c??{},{width:q,columnGap:z,rowGap:C,background:D,verticalGutter:H,verticalGutterMobile:L,enablePagePadding:Y,height:A}=k??{},B=m(v?.border,v?.rounded),E=(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},F=e("of",{desktop:E(B.desktop,t(v?.border,"desktop"))?"hidden":void 0,tablet:E(B.tablet,t(v?.border,"tablet"))?"hidden":void 0,mobile:E(B.mobile,t(v?.border,"mobile"))?"hidden":void 0}),G=h?.builderData?.childrens?.length,I={...e("aspect",{desktop:"16/9"})},J=o(u)||!G,K={desktop:q?.desktop==="default"?"1200px":q?.desktop,tablet:q?.tablet==="default"?"1200px":q?.tablet,mobile:q?.mobile==="default"?"1200px":q?.mobile},M=s(f?K:q),[N,P]=r(["pos","top","left","bottom","right","z"],x),Q=()=>({...j?P:x,...e("cg",H),...e("rg",L),...R?i(R):e("gtc",T),...e("w",M.content),...e("h",A),...j?{}:F}),U=()=>({"--mb":"0px","--mt":"0px",...e("cg",z),...l({pc:O,rg:C?b[C]:"0px"})}),V=t=>({...d(D,t),...n(D,{desktop:!0,tablet:!0,mobile:!0}),...e("pc",S)}),W=()=>{let e=w&&!J;return e?{marginLeft:"0px",marginRight:"0px"}:{}},X=()=>({...p(B)}),Z=(e=!1)=>a({...Q(),...V(),...W(),...e?U():{},...c?.sameHeightSubgridContainer&&y}),$=a({...X()}),_=a({...I,"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(Y?.desktop),tablet:ee(Y?.tablet),mobile:ee(Y?.mobile)},eo=a({...N,...e("w",M.wrapper),...e("pl",et),...e("pr",et)});return{embedVideoStyle:_,backgroundBoxStyle:$,rowStyle:Z,sectionStyle:eo}};export{getRowStyle};
