import{composeAdvanceStyle as e,template as s,WrapRenderChildren as i,RenderChildren as t}from"@gem-sdk/core";import{getStaticLocale as a}from"../../helpers.js";import{createStyle as r,createClass as o,If as m}from"@gem-sdk/system";import{getContainerStyles as d,getUlStyles as l,getWrapperStyles as c}from"../common/styles.js";import{getUlClasses as p,getWrapperClasses as n}from"../common/classes.js";let IconList=({builderProps:$,style:u,setting:g,rawChildren:f,styles:k,advanced:v,pageContext:y})=>{let{preload:L}=g||{},{background:b}=k||{},h=e(v),x=r(d({style:u,styles:k,type:"Liquid",uid:$?.uid??"",pageContext:y,extraData:{advancedClasses:h,isLiquid:!0}})),I=o(p(v?.cssClass)),j=r(l(k)),C=r(c(k)),q=o(n());return s`
    ${m(!!L,`${m(!!b?.desktop?.image?.src,`<link rel="preload" href="${b?.desktop?.image?.src}" as="image" />`)}
      ${m(!!b?.tablet?.image?.src,`<link rel="preload" href="${b?.tablet?.image?.src}" as="image" />`)}
      ${m(!!b?.mobile?.image?.src,`<link rel="preload" href="${b?.mobile?.image?.src}" as="image" />`)}`)}
    <div class="${q}" style="${C}">
    <div
      data-id="${$?.uid}"
       style="${x}">
     ${m(!f,s`<div>${a("IconList","icons_not_found")}</div>`)}
     ${m(!!f,s`<ul
        class="${I}"
        style="${j}"
        >
        ${i({uid:$?.uid??"",customProps:f?.[0].customProps},f?.map((e,s)=>{if(e)return t({...e,dataIndex:s,parentUid:$?.uid,parentStyles:k})}))}
      </ul>`)}
  </div>
  </div>
  `};export{IconList as default};
