'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),useGetProductId=require("../../hooks/useGetProductId.js"),Text=require("../../text/components/Text.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),helpers=require("../common/helpers.js"),useIconLineHeight=require("../hooks/useIconLineHeight.js");const IconListV2=e=>{let{builderProps:s,builderAttrs:t,style:l,setting:a,styles:r,pageContext:c,advanced:i}=e,n=system.createClass({[s?.uid??""]:!0}),o=system.createClass(classes.getClassWraplistIcon()),y=system.createClass(classes.getClassColListIcon()),m=system.createClass(classes.getClassWrapItemIcon({builderProps:s})),u=system.createClass(classes.getClassWrapIcon()),d=system.createClass(classes.getClassIcon()),p=system.createClass(classes.getClassTextItem({setting:a})),I=system.createStyle(styles.getStyleContainerIconlistMain({styles:r,style:l,type:"react",advanced:i})),x=system.createStyle(styles.getStyleWraplistIcon({styles:r,uid:s?.uid??"",pageContext:c})),g=system.createStyle(styles.getStyleColListIcon({styles:r})),h=system.createStyle(styles.getStyleIcon({styles:r,setting:a})),j=styles.getStyleTypoText({setting:a}),C=system.createAttr({...t}),S=helpers.getTextIconNotFound("react"),T=helpers.getvalueMap({setting:a}),{ref:v,lineHeight:L}=useIconLineHeight.useIconLineHeight({iconWidth:helpers.composeIconWith(a?.iconWidth)}),W=helpers.composePostionIconList(L,r?.position,a?.iconWidth),{refContainer:q,productID:R}=useGetProductId.useGetProductId(),N=system.createStyle({...styles.getStyleWrapIcon({styles:r,setting:a}),...W.content}),f=system.createStyle({...styles.getStyleWrapItemIcon({styles:r}),...W.wrapper});return jsxRuntime.jsx("div",{...C,...s,"data-id":s?.uid,style:I,className:n,ref:q,children:system.If(!T||!T.length,jsxRuntime.jsx("div",{children:S}),jsxRuntime.jsx("div",{className:o,style:x,children:jsxRuntime.jsx("div",{className:y,style:g,children:T?.map((e,t)=>{let l=helpers.getTextIconTranslations({setting:a,builderProps:s,pageContext:c,key:t,type:"react"});return jsxRuntime.jsxs("div",{"data-index":t,className:m,style:f,children:[jsxRuntime.jsx("div",{className:u,style:N,children:jsxRuntime.jsx("span",{style:h,className:d,dangerouslySetInnerHTML:{__html:e}})}),jsxRuntime.jsx(Text.default,{setting:{text:l?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${s?.uid}-${t}-${R}`,productID:R,customClass:{wrapper:"gp-w-full"}}},styles:j,className:p,ref:v})]},t)})})}))})};exports.default=IconListV2;
