import EmojiPickerOriginal from "@emoji-mart/react";
import { Box } from "@mui/material";

type Emoji = {
  emoticons: string[];
  id: string;
  keywords: string[];
  name: string;
  native: string;
  shortcodes: string;
  unified: string;
};

type EmojiPickerProps = {
  onEmojiSelect: (emoji: Emoji) => void;
};

export const EmojiPicker = ({ onEmojiSelect }: EmojiPickerProps) => (
  <Box sx={{ minWidth: "352px" }}>
    <EmojiPickerOriginal
      onEmojiSelect={onEmojiSelect}
      theme="light"
      locale="ru"
      exceptEmojis={ignoreEmojis}
    />
  </Box>
);

const ignoreEmojis = [
  "two_men_holding_hands",
  "two_women_holding_hands",
  "man-kiss-man",
  "woman-kiss-woman",
  "man-heart-man",
  "woman-heart-woman",
  "man-man-boy",
  "man-man-girl",
  "man-man-girl-boy",
  "man-man-girl-girl",
  "man-man-boy-boy",
  "woman-woman-boy",
  "woman-woman-girl",
  "woman-woman-girl-boy",
  "woman-woman-girl-girl",
  "woman-woman-boy-boy",
  "rainbow-flag",
  "transgender_flag",
  "transgender_symbol",
];
