"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5594],{83213:(e,t,n)=>{n.r(t),n.d(t,{EmojiPickerToolbar:()=>k});var s=n(57505),l=n(90321),o=n(77658),r=n(16697),a=n(79870),i=n(10615),c=n(77445),u=n(78473),d=n(50245),f=n(50307);let p=(0,n(29348).default)(()=>Promise.all([n.e(6858),n.e(4117)]).then(n.bind(n,24117)).then(e=>e.EmojiPickerContent),{loadableGenerated:{webpack:()=>[24117]},ssr:!1}),b=()=>{let e=(0,u.er)();return(0,s.jsx)(p,{onEmojiSelect:t=>{let n=t.native;if(!n||!e.selection)return;e.tf.insertText(n);let s=e.api.block()?.[1];e.selection&&s&&e.api.isEnd(e.selection.anchor,s)&&e.tf.insertText(" ");let l=e.selection;l&&e.tf.select(l),e.tf.focus(),(0,f.$O)()},onPickerDestroy:f.$O})},k=()=>{let e=(0,d.useRef)(null),t=(0,u.er)(),n=(0,c.md)(o.oR,{store:(0,o.$H)()})===t.id,{position:p,isPositionReady:k}=(0,a.G)(n,30);return(0,s.jsx)("div",{ref:e,className:"ab-emoji-picker-toolbar",children:(0,s.jsx)(l.A,{open:n&&k,align:"start",onOpenChange:e=>!e&&(0,f.$O)(),onOpenAutoFocus:e=>e.preventDefault(),className:"z-[100000000] rounded-3xl",content:(0,s.jsx)(b,{}),children:(0,s.jsx)("span",{className:(0,r.cn)("absolute",(0,i.AH)({...p}))})})})}}}]);