Loading
function(e,t,n){n.d(t,{A:()=>S});var l=n(627968),i=n(64700),r=n(503698),a=n.n(r),s=n(452027),o=n(140735),u=n(355622),c=n(408018),d=n(201349),p=n(915089),m=n(95701),h=n(788868),C=n(652215),A=n(375708),y=n(905126);let E=(0,m.createChannelRecord)({id:"1",type:C.rbe.DM}),P=(0,p.Ld)();function S(e){let{label:t=A.intl.string(A.t.B3miE8),onTextChange:n,pendingText:r,currentText:p,className:m,innerClassName:C,disableThemedBackground:S=!1}=e,[f,_]=i.useState(r??p),[T,I]=i.useState((0,c.x7)(f)),x=i.useRef(!1);function N(e,t,l){t!==f&&(_(t),I(l),n(t))}function g(){return new Promise(e=>{e({shouldClear:!1,shouldRefocus:!0})})}return i.useEffect(()=>{x.current=!0},[]),i.useEffect(()=>{if(void 0===r){let e=(0,c.x7)(p);_(p),I(e)}},[r,p]),(0,l.jsx)("div",{className:a()(y.rf,m),children:(0,l.jsx)(s.D,{label:t,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.Ay,{"aria-describedby":`${e.describedById} ${P}`,"aria-labelledby":e.labelId,innerClassName:a()(y.Tg,C),editorClassName:y.OT,maxCharacterCount:h.Jo,onChange:N,channel:E,textValue:f,richValue:T,type:u.oU.CUSTOM_GIFT,onBlur:()=>{x.current=!1},onFocus:()=>{x.current=!0},focused:x.current,onSubmit:g,disableThemedBackground:S}),(0,l.jsx)(o.A,{id:P,children:A.intl.format(A.t["+DFxLc"],{maxLength:h.Jo})})]})})})}}