'use client';
import{jsxs as s,jsx as t}from"react/jsx-runtime";import{Fragment as e}from"react";import{createAttr as o,createClass as l,createStyle as m,If as r}from"@gem-sdk/system";import i from"../../link/components/Link.js";import{getAttr as n}from"../common/attrs.js";import{getContainerClasses as a,getIconClasses as c}from"../common/classes.js";import{getWrapperStyle as d,getContainerStyle as p,getIconStyle as u}from"../common/styles.js";let Icon=({styles:f,builderAttrs:g,builderProps:y,setting:k={},style:h,children:j,advanced:I})=>{let{iconSvg:N,iconLink:v,iconLinkEnable:w}=k,x=v?.link&&w?i:e,C=v?.link?{setting:{type:"custom",href:v?.link,target:v?.target,label:v?.title,noFollow:v?.noFollow}}:{},F=o({...n({uid:y?.uid??"",builderAttrs:g})}),L=o({...y?.uid&&{"data-id":y?.uid}}),_=l({"gp-leading-[0]":!0,...y?.uid&&{[y.uid]:!0},...I?.cssClass&&{[I.cssClass]:!0}}),b=l({...a({styles:f,builderProps:y})}),H=l({...c({styles:f})}),M=m({...d(h,f)}),S=m({...p(f)}),T=m({...u(f)});return s("div",{...F,style:M,className:_,children:[t("div",{...L,className:b,style:S,children:r(!!N,t(x,{...C,children:t("span",{style:T,className:H,dangerouslySetInnerHTML:{__html:N||""}})}))}),j]})};export{Icon as default};
