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