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