"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),helpers=require("../common/helpers.js"),attrs=require("../common/attrs.js"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const Icon=({style:e,builderAttrs:s,builderProps:t,setting:r={},styles:l,advanced:a})=>{let{iconSvg:c,iconLinkEnable:y}=r,{Wrap:i,urlData:m,iconLink:o}=helpers.getLink(r,!0),n=o?.link&&y?{href:m.href,target:m?.target,title:o?.title,rel:m?.rel}:{},d=system.createAttr({...attrs.getAttr({uid:t?.uid??"",builderAttrs:s})}),u=system.createAttr({...t?.uid&&{"data-id":t?.uid}}),p=system.createClass({"gp-leading-[0]":!0,...t?.uid&&{[t.uid]:!0},...a?.cssClass&&{[a.cssClass]:!0}}),g=system.createClass({...classes.getContainerClasses({styles:l,builderProps:t})}),$=system.createClass({...classes.getIconClasses({styles:l})}),C=system.createStyle({...styles.getWrapperStyle(e,l)}),q=system.createStyle({...styles.getContainerStyle(l)}),v=system.createStyle({...styles.getIconStyle(l)});return system.Liquid(core.template`
    <div ${d} class="${p}" style="${C}">
      <div ${u} class="${g}" style="${q}">
      ${system.If(!!c,core.template`
        <${i} ${n}>
          <span style="${v}" class="${$}">${c}</span>
        </${i}>`)}
      </div>
    </div>
    `)};exports.default=Icon;
