import{dataStringify as s,template as i,RenderIf as t,isLocalEnv as e,baseAssetURL as l}from"@gem-sdk/core";import{getSettingPreloadData as o}from"../../helpers.js";import r from"../../text/components/Text.liquid.js";import{createClass as a,createStyle as d,createAttr as p,If as n}from"@gem-sdk/system";import{getClassWraplistIcon as c,getClassColListIcon as m,getClassWrapItemIcon as $,getClassWrapIcon as u,getClassIcon as g,getClassTextItem as v}from"../common/classes.js";import{getStyleContainerIconlistMain as y,getStyleWraplistIcon as f,getStyleColListIcon as j,getStyleWrapIcon as h,getStyleWrapItemIcon as q,getStyleIcon as x,getStyleTypoText as S}from"../common/styles.js";import{getvalueMap as k,getTextIconTranslations as E,getTextIconNotFound as A}from"../common/helpers.js";let N=N=>{let{builderProps:T,builderAttrs:V,style:_,setting:w,styles:C,pageContext:G}=N,I=T?.builderData?.advanced,L=a({[T?.uid??""]:!0}),O=a(c()),W=a(m()),b=a($({builderProps:T})),D=a(u()),F=a(g()),M=a(v({setting:w})),P=d(y({styles:C,style:_,type:"liquid",advanced:I})),R=d(f({styles:C,uid:T?.uid??"",pageContext:G,type:"Liquid"})),z=d(j({styles:C})),B=d(h({styles:C,setting:w})),H=d(q({styles:C})),J=d(x({styles:C,setting:w})),K=S({setting:w}),Q=p({...V}),U=A("liquid"),X=k({setting:w});return i`
    {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
    <gp-icon-list
      ${{...Q}}
      ${{...T}}
      data-id="${T?.uid}"
      style="${P}"
      className="${L}"
      gp-data='${s({position:C?.position,iconWidth:w?.iconWidth}).replaceAll("'","&#039;")}'
    >
      ${n(!X||!X.length,i`<div>${U}</div>`,i`
          <div class="${O}" style="${R}">
            <div class="${W}" style="${z}">
              ${X?.map((s,t)=>{let e=E({setting:w,builderProps:T,pageContext:G,key:t,type:"liquid"});return i`
                    <div
                      key="${t}"
                      data-index="${t}"
                      class="${b}"
                      style="${H}"
                    >
                      <div class="${D}" style="${B}">
                        <span
                          class="${F}"
                          style="${J}"
                        >
                          ${s}
                        </span>
                      </div>
                      ${r({setting:{text:e?.toString(),htmlTag:"div",options:{customClass:{wrapper:"gp-w-full"}},isForceValue:!0},styles:K,className:M})}
                    </div>`}).join(" ")}
            </div>
          </div>`)}
    </gp-icon-list>
    ${t(e,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-icon-list-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${l}/assets-v2/gp-icon-list-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
  `};export{N as default};
