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