'use client';
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useGetProductId as s}from"../../hooks/useGetProductId.js";import i from"../../text/components/Text.js";import{createClass as o,createStyle as r,createAttr as m,If as l}from"@gem-sdk/system";import{getClassWraplistIcon as n,getClassColListIcon as a,getClassWrapItemIcon as c,getClassWrapIcon as d,getClassIcon as p,getClassTextItem as u}from"../common/classes.js";import{getStyleContainerIconlistMain as h,getStyleWraplistIcon as f,getStyleColListIcon as y,getStyleIcon as g,getStyleWrapIcon as j,getStyleWrapItemIcon as v,getStyleTypoText as N}from"../common/styles.js";import{getvalueMap as x,composePostionIconList as I,getTextIconTranslations as L,getTextIconNotFound as k,composeIconWith as w}from"../common/helpers.js";import{useIconLineHeight as S}from"../hooks/useIconLineHeight.js";let IconListV2=T=>{let{builderProps:W,builderAttrs:$,style:H,setting:V,styles:_,pageContext:q,advanced:C}=T,G=o({[W?.uid??""]:!0}),M=o(n()),P=o(a()),b=o(c({builderProps:W})),z=o(d()),A=o(p()),B=o(u({setting:V})),D=r(h({styles:_,style:H,type:"react",advanced:C})),E=r(f({styles:_,uid:W?.uid??"",pageContext:q})),F=r(y({styles:_})),J=r(g({styles:_,setting:V})),K=N({setting:V}),O=m({...$}),Q=k("react"),R=x({setting:V}),{ref:U,lineHeight:X}=S({iconWidth:w(V?.iconWidth)}),Y=I(X,_?.position,V?.iconWidth),{refContainer:Z,productID:ee}=s(),et=r({...j({styles:_,setting:V}),...Y.content}),es=r({...v({styles:_}),...Y.wrapper});return e("div",{...O,...W,"data-id":W?.uid,style:D,className:G,ref:Z,children:l(!R||!R.length,e("div",{children:Q}),e("div",{className:M,style:E,children:e("div",{className:P,style:F,children:R?.map((s,o)=>{let r=L({setting:V,builderProps:W,pageContext:q,key:o,type:"react"});return t("div",{"data-index":o,className:b,style:es,children:[e("div",{className:z,style:et,children:e("span",{style:J,className:A,dangerouslySetInnerHTML:{__html:s}})}),e(i,{setting:{text:r?.toString(),htmlTag:"div",options:{useState:!0,uniqueId:`${W?.uid}-${o}-${ee}`,productID:ee,customClass:{wrapper:"gp-w-full"}}},styles:K,className:B,ref:U})]},o)})})}))})};export{IconListV2 as default};
