'use client';
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRenderMode as r}from"@gem-sdk/core";import{forwardRef as m}from"react";import{createAttr as o,createStyleReact as s,createClass as a,createContent as l}from"@gem-sdk/system";import{getAttr as i,getTextAttr as n}from"../common/attrs.js";import{getStyle as c,getContainerStyle as p,getTextStyle as d}from"../common/styles.js";import{getClasses as f,getContainerClasses as u,getTextClasses as y}from"../common/classes.js";import{getDisplayText as g}from"../common/helpers.js";let Text=m(({styles:m,builderAttrs:h,style:j,setting:v,advanced:x,builderProps:D,className:T,children:N,disableEdit:k,...S},_)=>{let{isEditMode:E,isPreviewSharePageMode:H}=r(),{htmlTag:I="div",options:L}=v??{},M=o({...i({uid:D?.uid||""})}),R=o({...n(L)}),b=s({...c(m,j)}),q=s({...p(m,v)}),w=s({...d(m,v)}),z=a({...f({setting:v,advanced:x,builderProps:D})}),A=a({...u({setting:v})}),B=a({...y({styles:m,setting:v,className:T,isEdit:E||H,disableEdit:k})}),C=g({type:"React",styles:m,setting:v,builderProps:D}),F=l(C);return e("div",{...M,...S,...h,style:b,className:z,children:[t("div",{className:A,style:{...q},children:t(I,{ref:_,...R,className:B,onDragStart:e=>e.preventDefault(),onDrop:e=>e.preventDefault(),style:{...w},dangerouslySetInnerHTML:{__html:F}})}),N]})});export{Text as default};
