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