// Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useMemo } from 'react'; import { VisuallyHidden } from 'react-aria'; import { Button } from 'react-aria-components'; import type { LocalizerType } from '../../types/I18N'; import { type EmojiVariantKey, getEmojiParentByKey, getEmojiParentKeyByVariantKey, getEmojiVariantByKey, } from './data/emojis'; import { FunStaticEmoji } from './FunEmoji'; /** * Fun Picker Button */ export type FunPickerButtonProps = Readonly<{ i18n: LocalizerType; }>; export function FunPickerButton(props: FunPickerButtonProps): JSX.Element { const { i18n } = props; return ( ); } /** * Emoji Picker Button */ export type FunEmojiPickerButtonProps = Readonly<{ selectedEmoji?: EmojiVariantKey | null; i18n: LocalizerType; }>; export function FunEmojiPickerButton( props: FunEmojiPickerButtonProps ): JSX.Element { const { i18n } = props; const selectedEmojiData = useMemo(() => { if (props.selectedEmoji == null) { return null; } const variantKey = props.selectedEmoji; const variant = getEmojiVariantByKey(variantKey); const parentKey = getEmojiParentKeyByVariantKey(variantKey); const parent = getEmojiParentByKey(parentKey); return { variant, parent }; }, [props.selectedEmoji]); return ( ); } /** * Sticker Picker Button */ export type FunStickerPickerButtonProps = Readonly<{ i18n: LocalizerType; }>; export function FunStickerPickerButton( props: FunStickerPickerButtonProps ): JSX.Element { const { i18n } = props; return ( ); }