import{template as s}from"@gem-sdk/core";import{createAttr as t,createClass as e,createStyle as r,Liquid as m,If as o}from"@gem-sdk/system";import{getLink as i}from"../common/helpers.js";import{getAttr as l}from"../common/attrs.js";import{getContainerClasses as a,getIconClasses as d}from"../common/classes.js";import{getWrapperStyle as $,getContainerStyle as c,getIconStyle as p}from"../common/styles.js";let n=({style:n,builderAttrs:f,builderProps:u,setting:g={},styles:y,advanced:j})=>{let{iconSvg:v,iconLinkEnable:h}=g,{Wrap:k,urlData:C,iconLink:x}=i(g,!0),I=x?.link&&h?{href:C.href,target:C?.target,title:x?.title,rel:C?.rel}:{},W=t({...l({uid:u?.uid??"",builderAttrs:f})}),b=t({...u?.uid&&{"data-id":u?.uid}}),q=e({"gp-leading-[0]":!0,...u?.uid&&{[u.uid]:!0},...j?.cssClass&&{[j.cssClass]:!0}}),w=e({...a({styles:y,builderProps:u})}),z=e({...d({styles:y})}),A=r({...$(n,y)}),B=r({...c(y)}),D=r({...p(y)});return m(s`
    <div ${W} class="${q}" style="${A}">
      <div ${b} class="${w}" style="${B}">
      ${o(!!v,s`
        <${k} ${I}>
          <span style="${D}" class="${z}">${v}</span>
        </${k}>`)}
      </div>
    </div>
    `)};export{n as default};
