import{template as e,RenderIf as s}from"@gem-sdk/core";import{createStyle as r,createClass as m}from"@gem-sdk/system";import{getCodeStyle as a}from"../common/styles.js";import{getCodeClasses as i}from"../common/classes.js";let CSSCode=({setting:t,style:l,advanced:o,builderAttrs:d,builderProps:c})=>{let{background:g,preloadBgImage:p}=t??{},$=o?.editorData,f=$?.html?.trim(),k=r(a(l,t,!0)),n=m(i(c?.uid,!$?.html&&!g,o?.cssClass));return e`
  ${s(!!p,`${s(!!g?.desktop?.image?.src,`<link rel="preload" href="${g?.desktop?.image?.src}" as="image" />`)}${s(!!g?.tablet?.image?.src,`<link rel="preload" href="${g?.tablet?.image?.src}" as="image" />`)}${s(!!g?.mobile?.image?.src,`<link rel="preload" href="${g?.mobile?.image?.src}" as="image" />`)}`)}
    <div
      ${{...d}}
      style="${k}"
      data-keep-class="true"
      class="${n}">
      <div>
    ${f}
    </div>
    </div>
  `};export{CSSCode as default};
