'use client';
import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import i from"next/head";import o from"../hooks/useCSSCode.js";import{createStyle as d,createClass as s,createAttr as m}from"@gem-sdk/system";import{getCodeStyle as t}from"../common/styles.js";import{getCodeClasses as l}from"../common/classes.js";let c=({setting:c,style:n,advanced:g,builderAttrs:u,builderProps:p,children:k,pageContext:h})=>{let{editorData:b}=g,{handleDoubleClickCustomCode:f,htmlPlainText:C,mode:y}=o(g,c),S=d(t({setting:c,style:n,isLiquid:!1,uid:p?.uid,pageContext:h??{},type:"React"})),j=s(l(p?.uid,"edit"!==y&&!b?.html,g?.cssClass)),x=m({...p?.uid&&{"data-id":p?.uid}});return e(r,{children:[a(i,{children:!!c?.preloadBgImage&&e(r,{children:[!!c?.background?.desktop?.image?.src&&a("link",{rel:"preload",href:c.background.desktop.image.src,as:"image"}),!!c?.background?.tablet?.image?.src&&a("link",{rel:"preload",href:c.background.tablet.image.src,as:"image"}),!!c?.background?.mobile?.image?.src&&a("link",{rel:"preload",href:c.background.mobile.image.src,as:"image"})]})}),e("div",{...x,onClick:f,"aria-hidden":"true",style:S,...u,className:j,children:[a("div",{dangerouslySetInnerHTML:{__html:C||""}}),k]})]})};export{c as default};
