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