"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers$1=require("../../helpers.js"),Text_liquid=require("../../text/components/Text.liquid.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js");const IconListV2=e=>{let{builderProps:s,builderAttrs:t,style:l,setting:a,styles:r,pageContext:i}=e,c=s?.builderData?.advanced,o=system.createClass({[s?.uid??""]:!0}),y=system.createClass(classes.getClassWraplistIcon()),n=system.createClass(classes.getClassColListIcon()),p=system.createClass(classes.getClassWrapItemIcon({builderProps:s})),d=system.createClass(classes.getClassWrapIcon()),m=system.createClass(classes.getClassIcon()),g=system.createClass(classes.getClassTextItem({setting:a})),u=system.createStyle(styles.getStyleContainerIconlistMain({styles:r,style:l,type:"liquid",advanced:c})),$=system.createStyle(styles.getStyleWraplistIcon({styles:r})),S=system.createStyle(styles.getStyleColListIcon({styles:r})),I=system.createStyle(styles.getStyleWrapIcon({styles:r,setting:a})),v=system.createStyle(styles.getStyleWrapItemIcon({styles:r})),C=system.createStyle(styles.getStyleIcon({styles:r,setting:a})),h=styles.getStyleTypoText({setting:a}),q=system.createAttr({...t}),f=helpers.getTextIconNotFound("liquid"),x=helpers.getvalueMap({setting:a});return core.template`
    {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
    <gp-icon-list
      ${{...q}}
      ${{...s}}
      data-id="${s?.uid}"
      style="${u}"
      className="${o}"
      gp-data='${core.dataStringify({position:r?.position,iconWidth:a?.iconWidth}).replaceAll("'","&#039;")}'
    >
      ${system.If(!x||!x.length,core.template`<div>${f}</div>`,core.template`
          <div class="${y}" style="${$}">
            <div class="${n}" style="${S}">
              ${x?.map((e,t)=>{let l=helpers.getTextIconTranslations({setting:a,builderProps:s,pageContext:i,key:t,type:"liquid"});return core.template`
                    <div
                      key="${t}"
                      data-index="${t}"
                      class="${p}"
                      style="${v}"
                    >
                      <div class="${d}" style="${I}">
                        <span
                          class="${m}"
                          style="${C}"
                        >
                          ${e}
                        </span>
                      </div>
                      ${Text_liquid.default({setting:{text:l?.toString(),htmlTag:"div",options:{customClass:{wrapper:"gp-w-full"}},isForceValue:!0},styles:h,className:g})}
                    </div>`}).join(" ")}
            </div>
          </div>`)}
    </gp-icon-list>
    ${core.RenderIf(core.isLocalEnv,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-icon-list-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-icon-list-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
  `};exports.default=IconListV2;
