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