'use client';
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{useEditorMode as s,isEmptyChildren as m}from"@gem-sdk/core";import o from"next/head";import t from"../../grid/components/ChildrenDroppable.js";import"react";import{ELEMENT_Z_INDEX as a}from"../../common/const.js";import d from"../hooks/useSticky.js";import{createStyle as l,createClass as c}from"@gem-sdk/system";import{getContentStyles as n}from"../common/styles.js";import{getContainerClasses as p}from"../common/classes.js";let g=({children:g,builderAttrs:f,setting:u,style:h,builderProps:k,advanced:j,pageContext:y})=>{let b=s(),{background:x,preloadBgImage:C,isScrollToTop:S}=u??{},{positionStyle:v,displayStyle:I,makeDisplaySettingStyles:q,getCSSAlign:z,w:D}=d(u),K=l({margin:"0 auto",...I,...z,...v,zIndex:a.STICKY,..."edit"!==b&&q}),L=l(n({setting:u,style:h,uid:k?.uid,pageContext:y??{}})),N=c(p({uid:k?.uid,isScrollToTop:S,cssClass:j?.cssClass,isLiquid:!1}));return e(r,{children:[!!C&&e(o,{children:[!!x?.desktop?.image?.src&&i("link",{rel:"preload",href:x.desktop.image.src,as:"image"}),!!x?.tablet?.image?.src&&i("link",{rel:"preload",href:x.tablet.image.src,as:"image"}),!!x?.mobile?.image?.src&&i("link",{rel:"preload",href:x.mobile.image.src,as:"image"})]}),i("div",{className:N,id:k?.uid,style:{...D,...K},children:i("div",{...f,"data-id":k?.uid,style:L,children:m(g)?i(t,{}):g})})]})};export{g as default};
