import 'package:flutter/material.dart';
import 'package:pyramid/core/theme.dart';

class EmojiPicker extends StatefulWidget {
  final ValueChanged<String> onEmojiSelected;
  final VoidCallback onClose;

  const EmojiPicker({
    super.key,
    required this.onEmojiSelected,
    required this.onClose,
  });

  @override
  State<EmojiPicker> createState() => _EmojiPickerState();
}

class _EmojiPickerState extends State<EmojiPicker> {
  int _categoryIndex = 0;
  final _searchCtrl = TextEditingController();
  String _query = '';

  @override
  void dispose() {
    _searchCtrl.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    final pt = PyramidTheme.of(context);
    final filtered = _query.isEmpty
        ? _kCategories[_categoryIndex].emojis
        : _kCategories
            .expand((c) => c.emojis)
            .where((e) => e.keywords.any((k) => k.contains(_query.toLowerCase())))
            .toList();

    return Container(
      width: 340,
      height: 380,
      decoration: BoxDecoration(
        color: pt.bg1,
        borderRadius: BorderRadius.circular(12),
        border: Border.all(color: pt.border),
        boxShadow: const [
          BoxShadow(color: Color(0x50000000), blurRadius: 24, offset: Offset(0, 8)),
        ],
      ),
      child: ClipRRect(
        borderRadius: BorderRadius.circular(12),
        child: Column(
          children: [
            // Search bar
            Padding(
              padding: const EdgeInsets.fromLTRB(8, 8, 8, 4),
              child: TextField(
                controller: _searchCtrl,
                style: TextStyle(color: pt.fg, fontSize: 13),
                decoration: InputDecoration(
                  hintText: 'Emoji suchen…',
                  hintStyle: TextStyle(color: pt.fgDim, fontSize: 13),
                  prefixIcon: Icon(Icons.search, size: 16, color: pt.fgDim),
                  isDense: true,
                  suffixIcon: _query.isNotEmpty
                      ? IconButton(
                          icon: Icon(Icons.clear, size: 14, color: pt.fgDim),
                          onPressed: () {
                            _searchCtrl.clear();
                            setState(() => _query = '');
                          },
                        )
                      : null,
                  contentPadding: const EdgeInsets.symmetric(vertical: 8),
                  filled: true,
                  fillColor: pt.bg2,
                  border: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(8),
                    borderSide: BorderSide(color: pt.border),
                  ),
                  enabledBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(8),
                    borderSide: BorderSide(color: pt.border),
                  ),
                  focusedBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(8),
                    borderSide: BorderSide(color: pt.accent),
                  ),
                ),
                onChanged: (v) => setState(() => _query = v.trim()),
              ),
            ),
            // Category tabs (hidden during search)
            if (_query.isEmpty)
              SizedBox(
                height: 36,
                child: ListView.builder(
                  scrollDirection: Axis.horizontal,
                  padding: const EdgeInsets.symmetric(horizontal: 6),
                  itemCount: _kCategories.length,
                  itemBuilder: (ctx, i) {
                    final selected = i == _categoryIndex;
                    return GestureDetector(
                      onTap: () => setState(() => _categoryIndex = i),
                      child: Container(
                        width: 36,
                        margin: const EdgeInsets.symmetric(vertical: 4, horizontal: 2),
                        decoration: BoxDecoration(
                          color: selected ? pt.accentSoft : Colors.transparent,
                          borderRadius: BorderRadius.circular(6),
                          border: Border.all(
                            color: selected ? pt.accent : Colors.transparent,
                          ),
                        ),
                        child: Center(
                          child: Text(
                            _kCategories[i].icon,
                            style: const TextStyle(fontSize: 16),
                          ),
                        ),
                      ),
                    );
                  },
                ),
              ),
            Container(height: 1, color: pt.border),
            // Emoji grid
            Expanded(
              child: GridView.builder(
                padding: const EdgeInsets.all(4),
                gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
                  crossAxisCount: 8,
                  childAspectRatio: 1,
                ),
                itemCount: filtered.length,
                itemBuilder: (ctx, i) {
                  final emoji = filtered[i];
                  return _EmojiCell(
                    emoji: emoji.char,
                    tooltip: emoji.keywords.isNotEmpty ? emoji.keywords.first : '',
                    pt: pt,
                    onTap: () => widget.onEmojiSelected(emoji.char),
                  );
                },
              ),
            ),
          ],
        ),
      ),
    );
  }
}

class _EmojiCell extends StatefulWidget {
  final String emoji;
  final String tooltip;
  final PyramidTheme pt;
  final VoidCallback onTap;

  const _EmojiCell({
    required this.emoji,
    required this.tooltip,
    required this.pt,
    required this.onTap,
  });

  @override
  State<_EmojiCell> createState() => _EmojiCellState();
}

class _EmojiCellState extends State<_EmojiCell> {
  bool _hovered = false;

  @override
  Widget build(BuildContext context) {
    return MouseRegion(
      cursor: SystemMouseCursors.click,
      onEnter: (_) => setState(() => _hovered = true),
      onExit: (_) => setState(() => _hovered = false),
      child: GestureDetector(
        onTap: widget.onTap,
        child: Tooltip(
          message: widget.tooltip,
          waitDuration: const Duration(milliseconds: 600),
          child: AnimatedContainer(
            duration: const Duration(milliseconds: 100),
            decoration: BoxDecoration(
              color: _hovered ? widget.pt.bgHover : Colors.transparent,
              borderRadius: BorderRadius.circular(6),
            ),
            child: Center(
              child: Text(widget.emoji, style: const TextStyle(fontSize: 20)),
            ),
          ),
        ),
      ),
    );
  }
}

// ─── Emoji data ────────────────────────────────────────────────────────────

class _EmojiEntry {
  final String char;
  final List<String> keywords;
  const _EmojiEntry(this.char, this.keywords);
}

class _EmojiCategory {
  final String icon;
  final String name;
  final List<_EmojiEntry> emojis;
  const _EmojiCategory(this.icon, this.name, this.emojis);
}

const _kCategories = [
  _EmojiCategory('😀', 'Smileys', _kSmileys),
  _EmojiCategory('👋', 'Personen', _kPeople),
  _EmojiCategory('🐶', 'Natur', _kNature),
  _EmojiCategory('🍕', 'Essen', _kFood),
  _EmojiCategory('⚽', 'Aktivitäten', _kActivities),
  _EmojiCategory('🚗', 'Reise', _kTravel),
  _EmojiCategory('💡', 'Objekte', _kObjects),
  _EmojiCategory('❤️', 'Symbole', _kSymbols),
];

const _kSmileys = [
  _EmojiEntry('😀', ['lächeln', 'grinsen', 'happy', 'smiley']),
  _EmojiEntry('😁', ['breit', 'grinsen']),
  _EmojiEntry('😂', ['lachen', 'tränen', 'witzig', 'lol']),
  _EmojiEntry('🤣', ['rollen', 'lachen', 'rofl']),
  _EmojiEntry('😃', ['lächeln', 'glücklich']),
  _EmojiEntry('😄', ['lächeln', 'augen']),
  _EmojiEntry('😅', ['schwitzen', 'erleichtert']),
  _EmojiEntry('😆', ['lachen', 'augen']),
  _EmojiEntry('😉', ['zwinkern', 'wink']),
  _EmojiEntry('😊', ['schüchtern', 'lächeln', 'rot']),
  _EmojiEntry('😋', ['lecker', 'zunge']),
  _EmojiEntry('😎', ['cool', 'sonnenbrille']),
  _EmojiEntry('😍', ['verliebt', 'herz', 'augen']),
  _EmojiEntry('🥰', ['verliebt', 'herzen']),
  _EmojiEntry('😘', ['kuss', 'herz']),
  _EmojiEntry('😗', ['kuss']),
  _EmojiEntry('😚', ['kuss', 'augen']),
  _EmojiEntry('😙', ['kuss', 'lächeln']),
  _EmojiEntry('🥲', ['lächeln', 'tränen']),
  _EmojiEntry('😏', ['verschmitzt', 'smirk']),
  _EmojiEntry('😒', ['unzufrieden', 'unamused']),
  _EmojiEntry('😞', ['enttäuscht']),
  _EmojiEntry('😔', ['nachdenklich', 'traurig']),
  _EmojiEntry('😟', ['besorgt']),
  _EmojiEntry('😕', ['verwirrt', 'confused']),
  _EmojiEntry('🙁', ['leicht', 'traurig']),
  _EmojiEntry('☹️', ['traurig', 'frowning']),
  _EmojiEntry('😣', ['kämpfend']),
  _EmojiEntry('😖', ['verwirrt', 'confounded']),
  _EmojiEntry('😫', ['erschöpft', 'tired']),
  _EmojiEntry('😩', ['müde', 'weary']),
  _EmojiEntry('🥺', ['bitte', 'augen']),
  _EmojiEntry('😢', ['weinen', 'cry']),
  _EmojiEntry('😭', ['laut', 'weinen', 'sob']),
  _EmojiEntry('😤', ['wütend', 'frustriert']),
  _EmojiEntry('😠', ['wütend', 'angry']),
  _EmojiEntry('😡', ['sehr wütend', 'rage']),
  _EmojiEntry('🤬', ['fluchen', 'wütend']),
  _EmojiEntry('🤯', ['explodierend', 'schockiert']),
  _EmojiEntry('😳', ['errötend', 'flushed']),
  _EmojiEntry('🥵', ['heiß', 'hot']),
  _EmojiEntry('🥶', ['kalt', 'cold']),
  _EmojiEntry('😱', ['schreien', 'angst']),
  _EmojiEntry('😨', ['ängstlich', 'fearful']),
  _EmojiEntry('😰', ['schwitzen', 'angst']),
  _EmojiEntry('😥', ['enttäuscht', 'erleichtert']),
  _EmojiEntry('😓', ['schwitzen', 'niedergeschlagen']),
  _EmojiEntry('🤗', ['umarmen', 'hug']),
  _EmojiEntry('🤔', ['denken', 'thinking']),
  _EmojiEntry('🫡', ['salutieren']),
  _EmojiEntry('🤭', ['kichern', 'hand']),
  _EmojiEntry('🫢', ['schockiert']),
  _EmojiEntry('🤫', ['shush', 'flüstern']),
  _EmojiEntry('🤥', ['lügen', 'pinocchio']),
  _EmojiEntry('😶', ['kein mund', 'sprachlos']),
  _EmojiEntry('😐', ['neutral']),
  _EmojiEntry('😑', ['ausdruckslos']),
  _EmojiEntry('😬', ['zähne', 'grimasse']),
  _EmojiEntry('🙄', ['augen', 'genervt']),
  _EmojiEntry('😯', ['überrascht', 'staunen']),
  _EmojiEntry('😦', ['grimasse', 'frowning']),
  _EmojiEntry('😧', ['gequält']),
  _EmojiEntry('😮', ['überrascht', 'open mouth']),
  _EmojiEntry('😲', ['erstaunt', 'astonished']),
  _EmojiEntry('🥱', ['gähnen', 'müde']),
  _EmojiEntry('🤤', ['sabbern', 'drooling']),
  _EmojiEntry('😴', ['schlafen', 'zzz']),
  _EmojiEntry('🤢', ['krank', 'übel']),
  _EmojiEntry('🤮', ['erbrechen', 'krank']),
  _EmojiEntry('🤧', ['niesen', 'krank']),
  _EmojiEntry('😷', ['maske', 'krank']),
  _EmojiEntry('🤒', ['fieber', 'krank']),
  _EmojiEntry('🤕', ['verletzt', 'verband']),
  _EmojiEntry('🤑', ['geld', 'reich']),
  _EmojiEntry('🤠', ['cowboy', 'hut']),
  _EmojiEntry('🥳', ['feiern', 'party']),
  _EmojiEntry('🥸', ['verkleidet']),
  _EmojiEntry('😎', ['cool', 'sonnenbrille']),
  _EmojiEntry('🤓', ['nerd', 'brille']),
  _EmojiEntry('🧐', ['monokel', 'nachdenklich']),
  _EmojiEntry('😈', ['teufel', 'böse']),
  _EmojiEntry('👿', ['teufel', 'wütend']),
  _EmojiEntry('💀', ['tot', 'schädel']),
  _EmojiEntry('☠️', ['totenkopf', 'kreuzknochgen']),
  _EmojiEntry('👻', ['geist', 'halloween']),
  _EmojiEntry('💩', ['häufchen', 'poop']),
  _EmojiEntry('🤡', ['clown']),
  _EmojiEntry('👾', ['monster', 'spiel']),
  _EmojiEntry('🎃', ['halloween', 'kürbis']),
];

const _kPeople = [
  _EmojiEntry('👋', ['hallo', 'winken', 'wave']),
  _EmojiEntry('🤚', ['hand', 'stopp']),
  _EmojiEntry('✋', ['hand', 'hoch']),
  _EmojiEntry('🖐️', ['hand', 'finger']),
  _EmojiEntry('👌', ['ok', 'prima']),
  _EmojiEntry('🤌', ['finger', 'pinch']),
  _EmojiEntry('✌️', ['frieden', 'victory', 'peace']),
  _EmojiEntry('🤞', ['finger', 'daumen']),
  _EmojiEntry('🤟', ['liebe', 'rock']),
  _EmojiEntry('🤘', ['rock', 'metal']),
  _EmojiEntry('👈', ['links', 'zeigen']),
  _EmojiEntry('👉', ['rechts', 'zeigen']),
  _EmojiEntry('👆', ['hoch', 'zeigen']),
  _EmojiEntry('👇', ['runter', 'zeigen']),
  _EmojiEntry('☝️', ['eins', 'oben']),
  _EmojiEntry('👍', ['daumen', 'hoch', 'gut', 'like']),
  _EmojiEntry('👎', ['daumen', 'runter', 'schlecht', 'dislike']),
  _EmojiEntry('✊', ['faust', 'punch']),
  _EmojiEntry('👊', ['faust', 'schlag']),
  _EmojiEntry('🤛', ['faust', 'links']),
  _EmojiEntry('🤜', ['faust', 'rechts']),
  _EmojiEntry('👏', ['klatschen', 'applaus']),
  _EmojiEntry('🙌', ['feiern', 'hände']),
  _EmojiEntry('🤝', ['handschlag', 'vereinbarung']),
  _EmojiEntry('🙏', ['bitte', 'danke', 'beten']),
  _EmojiEntry('✍️', ['schreiben', 'stift']),
  _EmojiEntry('💪', ['muskel', 'stark']),
  _EmojiEntry('🦵', ['bein']),
  _EmojiEntry('🦶', ['fuß']),
  _EmojiEntry('👂', ['ohr', 'hören']),
  _EmojiEntry('👃', ['nase', 'riechen']),
  _EmojiEntry('🧠', ['gehirn', 'denken']),
  _EmojiEntry('🦷', ['zahn']),
  _EmojiEntry('👀', ['augen', 'schauen']),
  _EmojiEntry('👁️', ['auge']),
  _EmojiEntry('👅', ['zunge']),
  _EmojiEntry('👄', ['lippen', 'kuss']),
  _EmojiEntry('💋', ['kuss', 'lippen']),
  _EmojiEntry('👶', ['baby']),
  _EmojiEntry('🧒', ['kind']),
  _EmojiEntry('👦', ['junge']),
  _EmojiEntry('👧', ['mädchen']),
  _EmojiEntry('🧑', ['person']),
  _EmojiEntry('👱', ['blond']),
  _EmojiEntry('👩', ['frau']),
  _EmojiEntry('👨', ['mann']),
  _EmojiEntry('🧓', ['älter']),
  _EmojiEntry('👴', ['alter mann']),
  _EmojiEntry('👵', ['alte frau']),
  _EmojiEntry('🧑‍💻', ['programmierer', 'developer']),
  _EmojiEntry('👨‍💻', ['mann', 'programmierer']),
  _EmojiEntry('👩‍💻', ['frau', 'programmierin']),
];

const _kNature = [
  _EmojiEntry('🐶', ['hund', 'dog']),
  _EmojiEntry('🐱', ['katze', 'cat']),
  _EmojiEntry('🐭', ['maus', 'mouse']),
  _EmojiEntry('🐹', ['hamster']),
  _EmojiEntry('🐰', ['hase', 'rabbit']),
  _EmojiEntry('🦊', ['fuchs', 'fox']),
  _EmojiEntry('🐻', ['bär', 'bear']),
  _EmojiEntry('🐼', ['panda']),
  _EmojiEntry('🐨', ['koala']),
  _EmojiEntry('🐯', ['tiger']),
  _EmojiEntry('🦁', ['löwe', 'lion']),
  _EmojiEntry('🐮', ['kuh', 'cow']),
  _EmojiEntry('🐷', ['schwein', 'pig']),
  _EmojiEntry('🐸', ['frosch', 'frog']),
  _EmojiEntry('🐵', ['affe', 'monkey']),
  _EmojiEntry('🐔', ['huhn', 'chicken']),
  _EmojiEntry('🐧', ['pinguin', 'penguin']),
  _EmojiEntry('🐦', ['vogel', 'bird']),
  _EmojiEntry('🦆', ['ente', 'duck']),
  _EmojiEntry('🦅', ['adler', 'eagle']),
  _EmojiEntry('🦉', ['eule', 'owl']),
  _EmojiEntry('🦇', ['fledermaus', 'bat']),
  _EmojiEntry('🐺', ['wolf']),
  _EmojiEntry('🐗', ['wildschwein', 'boar']),
  _EmojiEntry('🐴', ['pferd', 'horse']),
  _EmojiEntry('🦄', ['einhorn', 'unicorn']),
  _EmojiEntry('🐝', ['biene', 'bee']),
  _EmojiEntry('🐛', ['raupe', 'caterpillar']),
  _EmojiEntry('🦋', ['schmetterling', 'butterfly']),
  _EmojiEntry('🐌', ['schnecke', 'snail']),
  _EmojiEntry('🐞', ['marienkäfer', 'ladybug']),
  _EmojiEntry('🐜', ['ameise', 'ant']),
  _EmojiEntry('🌸', ['kirschblüte', 'cherry blossom']),
  _EmojiEntry('🌺', ['hibiskus']),
  _EmojiEntry('🌻', ['sonnenblume', 'sunflower']),
  _EmojiEntry('🌹', ['rose']),
  _EmojiEntry('🌷', ['tulpe', 'tulip']),
  _EmojiEntry('🌼', ['blume', 'flower']),
  _EmojiEntry('🌿', ['pflanze', 'plant']),
  _EmojiEntry('☘️', ['kleeblatt', 'shamrock']),
  _EmojiEntry('🍀', ['vierblättriges', 'glück', 'luck']),
  _EmojiEntry('🌲', ['baum', 'tree']),
  _EmojiEntry('🌳', ['baum', 'deciduous']),
  _EmojiEntry('🌴', ['palme', 'palm']),
  _EmojiEntry('🌵', ['kaktus', 'cactus']),
  _EmojiEntry('🌾', ['gras', 'getreide']),
  _EmojiEntry('🍄', ['pilz', 'mushroom']),
  _EmojiEntry('🌊', ['welle', 'wave', 'ozean']),
  _EmojiEntry('⛅', ['wolken', 'sonne']),
  _EmojiEntry('🌈', ['regenbogen', 'rainbow']),
  _EmojiEntry('❄️', ['schnee', 'schneflocke', 'cold']),
  _EmojiEntry('⭐', ['stern', 'star']),
  _EmojiEntry('🌟', ['stern', 'glitzern']),
  _EmojiEntry('✨', ['funken', 'glitzern', 'sparkle']),
  _EmojiEntry('🔥', ['feuer', 'fire', 'heiß']),
  _EmojiEntry('🌙', ['mond', 'moon']),
  _EmojiEntry('☀️', ['sonne', 'sun']),
];

const _kFood = [
  _EmojiEntry('🍎', ['apfel', 'apple']),
  _EmojiEntry('🍊', ['orange', 'mandarine']),
  _EmojiEntry('🍋', ['zitrone', 'lemon']),
  _EmojiEntry('🍇', ['trauben', 'grapes']),
  _EmojiEntry('🍓', ['erdbeere', 'strawberry']),
  _EmojiEntry('🍒', ['kirsche', 'cherry']),
  _EmojiEntry('🍑', ['pfirsich', 'peach']),
  _EmojiEntry('🥭', ['mango']),
  _EmojiEntry('🍍', ['ananas', 'pineapple']),
  _EmojiEntry('🥥', ['kokosnuss', 'coconut']),
  _EmojiEntry('🍅', ['tomate', 'tomato']),
  _EmojiEntry('🫐', ['blaubeere', 'blueberry']),
  _EmojiEntry('🍆', ['aubergine', 'eggplant']),
  _EmojiEntry('🥑', ['avocado']),
  _EmojiEntry('🫑', ['paprika']),
  _EmojiEntry('🌽', ['mais', 'corn']),
  _EmojiEntry('🥕', ['karotte', 'carrot']),
  _EmojiEntry('🧄', ['knoblauch', 'garlic']),
  _EmojiEntry('🧅', ['zwiebel', 'onion']),
  _EmojiEntry('🥔', ['kartoffel', 'potato']),
  _EmojiEntry('🍞', ['brot', 'bread']),
  _EmojiEntry('🥐', ['croissant']),
  _EmojiEntry('🧀', ['käse', 'cheese']),
  _EmojiEntry('🥚', ['ei', 'egg']),
  _EmojiEntry('🍳', ['bratpfanne', 'kochen']),
  _EmojiEntry('🥓', ['speck', 'bacon']),
  _EmojiEntry('🍗', ['hühnchen', 'chicken']),
  _EmojiEntry('🍖', ['fleisch', 'knochen']),
  _EmojiEntry('🌭', ['hotdog']),
  _EmojiEntry('🍔', ['burger', 'hamburger']),
  _EmojiEntry('🍟', ['pommes', 'fries']),
  _EmojiEntry('🍕', ['pizza']),
  _EmojiEntry('🥪', ['sandwich']),
  _EmojiEntry('🌮', ['taco']),
  _EmojiEntry('🌯', ['wrap']),
  _EmojiEntry('🥗', ['salat', 'salad']),
  _EmojiEntry('🍜', ['nudeln', 'noodles', 'ramen']),
  _EmojiEntry('🍣', ['sushi']),
  _EmojiEntry('🍦', ['eis', 'softeis']),
  _EmojiEntry('🎂', ['torte', 'geburtstag']),
  _EmojiEntry('🍰', ['kuchen', 'cake']),
  _EmojiEntry('🧁', ['muffin', 'cupcake']),
  _EmojiEntry('🍩', ['donut']),
  _EmojiEntry('🍪', ['keks', 'cookie']),
  _EmojiEntry('🍫', ['schokolade', 'chocolate']),
  _EmojiEntry('🍬', ['bonbon', 'candy']),
  _EmojiEntry('☕', ['kaffee', 'coffee']),
  _EmojiEntry('🍵', ['tee', 'tea']),
  _EmojiEntry('🧋', ['bubble tea']),
  _EmojiEntry('🥤', ['getränk', 'cup']),
  _EmojiEntry('🍺', ['bier', 'beer']),
  _EmojiEntry('🍻', ['bier', 'prost', 'cheers']),
  _EmojiEntry('🥂', ['sekt', 'cheers', 'toast']),
  _EmojiEntry('🍷', ['wein', 'wine']),
  _EmojiEntry('🥃', ['whiskey']),
];

const _kActivities = [
  _EmojiEntry('⚽', ['fußball', 'soccer']),
  _EmojiEntry('🏀', ['basketball']),
  _EmojiEntry('🏈', ['american football']),
  _EmojiEntry('⚾', ['baseball']),
  _EmojiEntry('🎾', ['tennis']),
  _EmojiEntry('🏐', ['volleyball']),
  _EmojiEntry('🏉', ['rugby']),
  _EmojiEntry('🥏', ['frisbee']),
  _EmojiEntry('🎱', ['billard', 'pool']),
  _EmojiEntry('🏓', ['tischtennis', 'ping pong']),
  _EmojiEntry('🏸', ['badminton']),
  _EmojiEntry('🥊', ['boxen', 'boxing']),
  _EmojiEntry('🥋', ['kampfsport', 'martial arts']),
  _EmojiEntry('🥅', ['tor', 'goal']),
  _EmojiEntry('⛳', ['golf']),
  _EmojiEntry('🎿', ['ski']),
  _EmojiEntry('🛷', ['schlitten', 'sled']),
  _EmojiEntry('🏆', ['pokal', 'trophy', 'gewonnen']),
  _EmojiEntry('🥇', ['gold', 'erster']),
  _EmojiEntry('🥈', ['silber', 'zweiter']),
  _EmojiEntry('🥉', ['bronze', 'dritter']),
  _EmojiEntry('🎮', ['spiel', 'gaming', 'controller']),
  _EmojiEntry('🕹️', ['joystick', 'spiel']),
  _EmojiEntry('🎲', ['würfel', 'dice']),
  _EmojiEntry('🧩', ['puzzle']),
  _EmojiEntry('🎯', ['ziel', 'dartscheibe']),
  _EmojiEntry('🎳', ['bowling']),
  _EmojiEntry('🎪', ['zirkus', 'circus']),
  _EmojiEntry('🎨', ['kunst', 'malen', 'art']),
  _EmojiEntry('🎭', ['theater', 'drama']),
  _EmojiEntry('🎬', ['film', 'klappe', 'movie']),
  _EmojiEntry('🎵', ['musik', 'note']),
  _EmojiEntry('🎶', ['musik', 'noten']),
  _EmojiEntry('🎸', ['gitarre', 'guitar']),
  _EmojiEntry('🎹', ['klavier', 'piano']),
  _EmojiEntry('🥁', ['schlagzeug', 'drum']),
  _EmojiEntry('🎷', ['saxophon']),
  _EmojiEntry('🎺', ['trompete', 'trumpet']),
  _EmojiEntry('🎻', ['geige', 'violin']),
  _EmojiEntry('🎤', ['mikrofon', 'microphone']),
];

const _kTravel = [
  _EmojiEntry('🚗', ['auto', 'car']),
  _EmojiEntry('🚕', ['taxi']),
  _EmojiEntry('🚙', ['suv', 'auto']),
  _EmojiEntry('🚌', ['bus']),
  _EmojiEntry('🚎', ['trolleybus']),
  _EmojiEntry('🏎️', ['rennauto', 'racecar']),
  _EmojiEntry('🚓', ['polizei', 'police']),
  _EmojiEntry('🚑', ['krankenwagen', 'ambulance']),
  _EmojiEntry('🚒', ['feuerwehr', 'fire truck']),
  _EmojiEntry('🚐', ['minibus', 'van']),
  _EmojiEntry('🛻', ['pickup']),
  _EmojiEntry('🚚', ['lieferwagen', 'truck']),
  _EmojiEntry('🚛', ['lkw', 'truck']),
  _EmojiEntry('🏍️', ['motorrad', 'motorcycle']),
  _EmojiEntry('🚲', ['fahrrad', 'bicycle', 'bike']),
  _EmojiEntry('🛵', ['roller', 'scooter']),
  _EmojiEntry('✈️', ['flugzeug', 'plane', 'fliegen']),
  _EmojiEntry('🚀', ['rakete', 'rocket', 'space']),
  _EmojiEntry('🛸', ['ufo']),
  _EmojiEntry('🚁', ['hubschrauber', 'helicopter']),
  _EmojiEntry('⛵', ['segelboot', 'sailboat']),
  _EmojiEntry('🚢', ['schiff', 'ship']),
  _EmojiEntry('🚂', ['zug', 'train']),
  _EmojiEntry('🚄', ['hochgeschwindigkeitszug', 'bullet train']),
  _EmojiEntry('🏠', ['haus', 'home']),
  _EmojiEntry('🏡', ['haus', 'garten']),
  _EmojiEntry('🏢', ['büro', 'office']),
  _EmojiEntry('🏰', ['schloss', 'castle']),
  _EmojiEntry('🗼', ['turm', 'eiffelturm']),
  _EmojiEntry('🗽', ['freiheitsstatue']),
  _EmojiEntry('🌍', ['erde', 'europa', 'africa']),
  _EmojiEntry('🌎', ['erde', 'americas']),
  _EmojiEntry('🌏', ['erde', 'asia']),
  _EmojiEntry('🗺️', ['karte', 'map']),
  _EmojiEntry('🧭', ['kompass', 'compass']),
  _EmojiEntry('⛺', ['zelt', 'camping']),
  _EmojiEntry('🏖️', ['strand', 'beach']),
  _EmojiEntry('🏔️', ['berg', 'mountain']),
  _EmojiEntry('🌋', ['vulkan', 'volcano']),
];

const _kObjects = [
  _EmojiEntry('💡', ['idee', 'licht', 'light', 'lamp']),
  _EmojiEntry('🔦', ['taschenlampe', 'flashlight']),
  _EmojiEntry('💻', ['laptop', 'computer']),
  _EmojiEntry('🖥️', ['monitor', 'desktop']),
  _EmojiEntry('🖨️', ['drucker', 'printer']),
  _EmojiEntry('⌨️', ['tastatur', 'keyboard']),
  _EmojiEntry('🖱️', ['maus', 'mouse']),
  _EmojiEntry('📱', ['handy', 'phone', 'smartphone']),
  _EmojiEntry('☎️', ['telefon', 'phone']),
  _EmojiEntry('📞', ['telefon', 'anruf', 'call']),
  _EmojiEntry('📷', ['kamera', 'camera']),
  _EmojiEntry('📸', ['foto', 'kamera', 'selfie']),
  _EmojiEntry('📹', ['video', 'kamera']),
  _EmojiEntry('🎥', ['film', 'kamera', 'movie']),
  _EmojiEntry('📺', ['tv', 'fernseher', 'television']),
  _EmojiEntry('📻', ['radio']),
  _EmojiEntry('🎙️', ['mikrofon', 'microphone']),
  _EmojiEntry('📡', ['satellit', 'satellite']),
  _EmojiEntry('🔋', ['batterie', 'battery']),
  _EmojiEntry('🔌', ['stecker', 'plug']),
  _EmojiEntry('💾', ['diskette', 'speichern', 'save']),
  _EmojiEntry('💿', ['cd', 'disk']),
  _EmojiEntry('📀', ['dvd', 'disc']),
  _EmojiEntry('📁', ['ordner', 'folder']),
  _EmojiEntry('📂', ['ordner', 'offen']),
  _EmojiEntry('📄', ['datei', 'dokument', 'file']),
  _EmojiEntry('📃', ['seite', 'dokument']),
  _EmojiEntry('📋', ['zwischenablage', 'clipboard']),
  _EmojiEntry('📊', ['grafik', 'diagramm', 'chart']),
  _EmojiEntry('📈', ['aufwärts', 'wachstum', 'chart']),
  _EmojiEntry('📉', ['abwärts', 'rückgang', 'chart']),
  _EmojiEntry('📌', ['pin', 'nadel']),
  _EmojiEntry('📍', ['ort', 'pin', 'location']),
  _EmojiEntry('✏️', ['stift', 'pen']),
  _EmojiEntry('✒️', ['füllfeder', 'pen']),
  _EmojiEntry('🖊️', ['kugelschreiber', 'pen']),
  _EmojiEntry('📝', ['notiz', 'memo', 'schreiben']),
  _EmojiEntry('📚', ['bücher', 'books']),
  _EmojiEntry('📖', ['buch', 'lesen']),
  _EmojiEntry('🔑', ['schlüssel', 'key']),
  _EmojiEntry('🔒', ['schloss', 'lock']),
  _EmojiEntry('🔓', ['offen', 'unlock']),
  _EmojiEntry('🔨', ['hammer']),
  _EmojiEntry('🪛', ['schraubenzieher']),
  _EmojiEntry('⚙️', ['zahnrad', 'einstellungen', 'settings']),
  _EmojiEntry('🧲', ['magnet']),
  _EmojiEntry('🔭', ['teleskop', 'telescope']),
  _EmojiEntry('🔬', ['mikroskop', 'microscope']),
  _EmojiEntry('💊', ['pille', 'medikament']),
  _EmojiEntry('🩺', ['stethoskop', 'arzt']),
  _EmojiEntry('🧪', ['reagenzglas', 'experiment']),
  _EmojiEntry('💰', ['geld', 'tasche', 'money']),
  _EmojiEntry('💳', ['karte', 'kreditkarte']),
  _EmojiEntry('🎁', ['geschenk', 'present']),
  _EmojiEntry('🎀', ['schleife', 'ribbon']),
  _EmojiEntry('🧨', ['feuerwerk', 'cracker']),
  _EmojiEntry('🎉', ['feier', 'party', 'celebration']),
  _EmojiEntry('🎊', ['konfetti', 'party']),
  _EmojiEntry('🏮', ['laterne', 'lantern']),
  _EmojiEntry('⌚', ['uhr', 'watch', 'zeit']),
  _EmojiEntry('📅', ['kalender', 'calendar']),
  _EmojiEntry('⏰', ['wecker', 'alarm']),
  _EmojiEntry('⏳', ['sanduhr', 'hourglass']),
];

const _kSymbols = [
  _EmojiEntry('❤️', ['herz', 'liebe', 'love', 'heart']),
  _EmojiEntry('🧡', ['orange', 'herz']),
  _EmojiEntry('💛', ['gelb', 'herz']),
  _EmojiEntry('💚', ['grün', 'herz']),
  _EmojiEntry('💙', ['blau', 'herz']),
  _EmojiEntry('💜', ['lila', 'herz']),
  _EmojiEntry('🖤', ['schwarz', 'herz']),
  _EmojiEntry('🤍', ['weiß', 'herz']),
  _EmojiEntry('🤎', ['braun', 'herz']),
  _EmojiEntry('💔', ['gebrochenes herz', 'broken heart']),
  _EmojiEntry('❣️', ['herz', 'ausrufezeichen']),
  _EmojiEntry('💕', ['zwei herzen', 'love']),
  _EmojiEntry('💞', ['herzen', 'drehend']),
  _EmojiEntry('💓', ['herz', 'schlagen']),
  _EmojiEntry('💗', ['herz', 'wachsend']),
  _EmojiEntry('💖', ['herz', 'glitzer']),
  _EmojiEntry('💝', ['herz', 'schleife']),
  _EmojiEntry('💘', ['herz', 'pfeil', 'cupid']),
  _EmojiEntry('💟', ['herz', 'dekoration']),
  _EmojiEntry('☮️', ['frieden', 'peace']),
  _EmojiEntry('✝️', ['kreuz', 'christian']),
  _EmojiEntry('☯️', ['yin yang']),
  _EmojiEntry('🔴', ['rot', 'kreis', 'red']),
  _EmojiEntry('🟠', ['orange', 'kreis']),
  _EmojiEntry('🟡', ['gelb', 'kreis']),
  _EmojiEntry('🟢', ['grün', 'kreis']),
  _EmojiEntry('🔵', ['blau', 'kreis']),
  _EmojiEntry('🟣', ['lila', 'kreis']),
  _EmojiEntry('⚫', ['schwarz', 'kreis']),
  _EmojiEntry('⚪', ['weiß', 'kreis']),
  _EmojiEntry('🟤', ['braun', 'kreis']),
  _EmojiEntry('🔺', ['rot', 'dreieck']),
  _EmojiEntry('🔻', ['rot', 'dreieck', 'runter']),
  _EmojiEntry('♾️', ['unendlich', 'infinity']),
  _EmojiEntry('✅', ['haken', 'check', 'ok', 'ja']),
  _EmojiEntry('❌', ['x', 'nein', 'falsch', 'close']),
  _EmojiEntry('❎', ['x', 'kreuz', 'nein']),
  _EmojiEntry('⭕', ['kreis', 'richtig']),
  _EmojiEntry('🚫', ['verboten', 'nein']),
  _EmojiEntry('⚠️', ['warnung', 'warning']),
  _EmojiEntry('🔞', ['verboten', '18+']),
  _EmojiEntry('❗', ['ausrufezeichen', 'wichtig']),
  _EmojiEntry('❓', ['fragezeichen', 'frage']),
  _EmojiEntry('💯', ['100', 'perfekt', 'perfect']),
  _EmojiEntry('🆗', ['ok', 'schaltfläche']),
  _EmojiEntry('🆕', ['neu', 'new']),
  _EmojiEntry('🆙', ['up']),
  _EmojiEntry('🔝', ['top', 'oben']),
  _EmojiEntry('🔛', ['an']),
  _EmojiEntry('🔜', ['bald', 'soon']),
  _EmojiEntry('🔚', ['ende', 'end']),
  _EmojiEntry('♻️', ['recycling', 'wiederverwertung']),
  _EmojiEntry('💲', ['dollar', 'geld']),
  _EmojiEntry('©️', ['copyright']),
  _EmojiEntry('®️', ['eingetragen', 'trademark']),
  _EmojiEntry('™️', ['markenzeichen', 'trademark']),
  _EmojiEntry('🔔', ['glocke', 'bell', 'benachrichtigung']),
  _EmojiEntry('🔕', ['stille', 'no bell']),
  _EmojiEntry('🎵', ['musik', 'note']),
  _EmojiEntry('🎶', ['musik', 'noten']),
  _EmojiEntry('#️⃣', ['raute', 'hash', 'hashtag']),
  _EmojiEntry('*️⃣', ['stern', 'asterisk']),
  _EmojiEntry('0️⃣', ['null', 'zero']),
  _EmojiEntry('1️⃣', ['eins', 'one']),
  _EmojiEntry('2️⃣', ['zwei', 'two']),
  _EmojiEntry('3️⃣', ['drei', 'three']),
];
