'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),classes=require("../common/classes.js"),styles=require("../common/styles.js"),system=require("@gem-sdk/system"),helpers=require("../common/helpers.js"),React=require("react"),attrs=require("../common/attrs.js");const Text=({styles:e,builderAttrs:s,style:t,setting:r,advanced:a,builderProps:l,className:c,children:n,textClassWrapper:o,textClass:i,...m})=>{let{text:y,options:u}=r??{},{textAlign:x,typo:d,align:p,direction:j}=e??{},g=React.useMemo(()=>helpers.createContent(y,d?.textTransform,d?.textColor),[y,d?.textTransform,d?.textColor]),h=system.createClass({...classes.getContainerClasses({className:c,uid:l?.uid,align:p})}),C=system.createClass({...classes.getWrapperClasses({textClassWrapper:o})}),T=system.createClass({...classes.getTextClasses({textClass:i})}),q=system.createStyle({...styles.getContainerStyles({style:t})}),R=system.createStyle({...styles.getWrapperStyles({styles:e})}),S=system.createStyle({...styles.getTextStyles({textAlign:x,typo:d})}),f=system.createAttr({...s}),v=system.createAttr({...attrs.getTextAttrs({options:u})});return jsxRuntime.jsx("div",{...m,...f,className:h,style:{...q},children:jsxRuntime.jsx("div",{className:C,style:{...R},children:jsxRuntime.jsx("div",{className:T,...v,style:{...S},dangerouslySetInnerHTML:{__html:g?`<bdo dir="${j}" >${g}</bdo>`:`<span style="color: #9e9e9e; font-size: 12.28px; font-weight: 400; line-height: 18px;
              text-decoration: unset;">Replace this text with your content</span>`}})})})};exports.default=Text;
