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