<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\CoreBundle\Emoji;

/**
 * A curated set of playful, holiday/season-themed emoji, stored as GitHub-style
 * short codes (e.g. ":tada:") so they persist as plain ASCII in the database
 * (see https://symfony.com/doc/current/emoji.html).
 *
 * Every short code is verified to round-trip through Symfony's `github-emoji`
 * transliterator, so {@see \Ferienpass\AdminBundle\Emoji\EmojiRenderer} can turn
 * each one back into its Unicode glyph for display.
 */
final class EmojiDictionary
{
    /**
     * @var list<string>
     */
    public const CODES = [
        ':tada:', ':confetti_ball:', ':partying_face:', ':balloon:', ':gift:', ':ribbon:', ':sparkles:', ':star2:',
        ':star:', ':dizzy:', ':fire:', ':zap:', ':rainbow:', ':sunny:', ':partly_sunny:', ':cloud:',
        ':snowflake:', ':snowman:', ':sun_with_face:', ':full_moon_with_face:', ':crescent_moon:', ':first_quarter_moon_with_face:', ':sun_behind_small_cloud:', ':sun_behind_rain_cloud:',
        ':ocean:', ':droplet:', ':fallen_leaf:', ':maple_leaf:', ':herb:', ':four_leaf_clover:', ':seedling:', ':deciduous_tree:',
        ':evergreen_tree:', ':palm_tree:', ':cactus:', ':ear_of_rice:', ':sunflower:', ':tulip:', ':rose:', ':cherry_blossom:',
        ':hibiscus:', ':bouquet:', ':mushroom:', ':dog:', ':cat:', ':mouse:', ':hamster:', ':rabbit:',
        ':fox_face:', ':bear:', ':panda_face:', ':koala:', ':tiger:', ':lion:', ':cow:', ':pig:',
        ':frog:', ':monkey_face:', ':chicken:', ':penguin:', ':bird:', ':baby_chick:', ':duck:', ':eagle:',
        ':owl:', ':bat:', ':wolf:', ':boar:', ':horse:', ':unicorn:', ':honeybee:', ':bug:',
        ':butterfly:', ':snail:', ':lady_beetle:', ':ant:', ':turtle:', ':snake:', ':octopus:', ':squid:',
        ':crab:', ':tropical_fish:', ':fish:', ':blowfish:', ':flipper:', ':whale:', ':whale2:', ':shark:',
        ':crocodile:', ':elephant:', ':camel:', ':dromedary_camel:', ':giraffe:', ':cow2:', ':racehorse:', ':pig2:',
        ':sheep:', ':goat:', ':deer:', ':dog2:', ':cat2:', ':rooster:', ':turkey:', ':peacock:',
        ':parrot:', ':rabbit2:', ':raccoon:', ':hedgehog:', ':apple:', ':green_apple:', ':pear:', ':tangerine:',
        ':lemon:', ':banana:', ':watermelon:', ':grapes:', ':strawberry:', ':melon:', ':cherries:', ':peach:',
        ':pineapple:', ':coconut:', ':kiwi_fruit:', ':tomato:', ':avocado:', ':broccoli:', ':corn:', ':carrot:',
        ':potato:', ':bread:', ':cheese:', ':egg:', ':hamburger:', ':fries:', ':pizza:', ':hotdog:',
        ':taco:', ':burrito:', ':popcorn:', ':doughnut:', ':cookie:', ':birthday:', ':cupcake:', ':pie:',
        ':chocolate_bar:', ':candy:', ':lollipop:', ':honey_pot:', ':icecream:', ':ice_cream:', ':shaved_ice:', ':cake:',
        ':pretzel:', ':croissant:', ':pancakes:', ':spaghetti:', ':ramen:', ':stew:', ':curry:', ':sushi:',
        ':soccer:', ':basketball:', ':football:', ':baseball:', ':tennis:', ':volleyball:', ':rugby_football:', ':8ball:',
        ':golf:', ':ski:', ':sled:', ':fishing_pole_and_fish:', ':bicyclist:', ':swimmer:', ':surfer:', ':rowboat:',
        ':sailboat:', ':kite:', ':dart:', ':bowling:', ':video_game:', ':game_die:', ':performing_arts:', ':art:',
        ':clapper:', ':microphone:', ':headphones:', ':musical_note:', ':notes:', ':guitar:', ':violin:', ':trumpet:',
        ':saxophone:', ':drum:', ':flags:', ':wind_chime:', ':sparkler:', ':fireworks:', ':ferris_wheel:', ':roller_coaster:',
        ':carousel_horse:', ':circus_tent:', ':tent:', ':beach_umbrella:', ':desert_island:', ':mountain_snow:', ':volcano:', ':red_car:',
        ':taxi:', ':bus:', ':steam_locomotive:', ':airplane:', ':helicopter:', ':rocket:', ':ship:', ':anchor:',
        ':earth_africa:', ':earth_americas:', ':earth_asia:', ':world_map:', ':compass:', ':european_castle:', ':pinata:', ':teddy_bear:',
    ];

    public static function random(): string
    {
        return self::CODES[array_rand(self::CODES)];
    }

    public static function has(string $code): bool
    {
        return \in_array($code, self::CODES, true);
    }
}
