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