import{template as t}from"@gem-sdk/core";import{createAttr as e,createStyle as s,createClass as o,createContent as i}from"@gem-sdk/system";import{getAttr as r,getTextAttr as m}from"../common/attrs.js";import{getStyle as l,getContainerStyle as a,getTextStyle as p}from"../common/styles.js";import{getClasses as d,getTextClasses as n}from"../common/classes.js";import{getDisplayText as c}from"../common/helpers.js";let Text=({id:$,styles:u,builderAttrs:f,style:g,setting:y,advanced:j,builderProps:v,className:x,isText:T,pageContext:h,elementAttrs:k})=>{let{htmlTag:q="div",excludeFlex:b}=y??{},w=e({...$&&{id:$},...r({uid:v?.uidInteraction??v?.uid??""}),...f}),D=e({...m(),...k}),I=s({...l(u,g)}),L=s({...a(u,y)}),O=s({...p(u,y)}),_=o({...d({setting:y,advanced:j,builderProps:v})}),z=o({"gp-flex":!b}),A=o({...n({styles:u,setting:y,className:x}),...T&&{"gp-text":!0}}),B=c({type:"Liquid",styles:u,setting:y,builderProps:v,pageContext:h}),C=i(B);return t`
    {% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}
    <div ${{...w}}
        class="${_}"
        style="${I}"
        data-test-force-publish="${new Date().getTime()}"
      >
      <div class="${z}" style="${L}">
        <${q}
          ${{...D}}
          class="${A}"
          style="${O}"
        >
          ${C}
        </${q}>
      </div>
    </div>
    `};export{Text as default};
