<?php

namespace App;

trait ColorPicker
{
    public static function chooseColor($letter): array
    {
        $colorReferences = [
            'A' => ['dark' => 'dark:bg-amber-500', 'light' => 'bg-amber-800'],
            'B' => ['dark' => 'dark:bg-blue-500', 'light' => 'bg-blue-800'],
            'C' => ['dark' => 'dark:bg-cyan-500', 'light' => 'bg-cyan-800'],
            'D' => ['dark' => 'dark:bg-emerald-500', 'light' => 'bg-emerald-800'],
            'E' => ['dark' => 'dark:bg-fuchsia-500', 'light' => 'bg-fuchsia-800'],
            'F' => ['dark' => 'dark:bg-gray-500', 'light' => 'bg-gray-800'],
            'G' => ['dark' => 'dark:bg-green-500', 'light' => 'bg-green-800'],
            'H' => ['dark' => 'dark:bg-indigo-500', 'light' => 'bg-indigo-800'],
            'I' => ['dark' => 'dark:bg-lime-500', 'light' => 'bg-lime-800'],
            'J' => ['dark' => 'dark:bg-neutral-500', 'light' => 'bg-neutral-800'],
            'K' => ['dark' => 'dark:bg-orange-500', 'light' => 'bg-orange-800'],
            'L' => ['dark' => 'dark:bg-pink-500', 'light' => 'bg-pink-800'],
            'M' => ['dark' => 'dark:bg-purple-500', 'light' => 'bg-purple-800'],
            'N' => ['dark' => 'dark:bg-red-500', 'light' => 'bg-red-800'],
            'O' => ['dark' => 'dark:bg-rose-500', 'light' => 'bg-rose-800'],
            'P' => ['dark' => 'dark:bg-sky-500', 'light' => 'bg-sky-800'],
            'Q' => ['dark' => 'dark:bg-slate-500', 'light' => 'bg-slate-800'],
            'R' => ['dark' => 'dark:bg-stone-500', 'light' => 'bg-stone-800'],
            'S' => ['dark' => 'dark:bg-teal-500', 'light' => 'bg-teal-800'],
            'T' => ['dark' => 'dark:bg-violet-500', 'light' => 'bg-violet-800'],
            'U' => ['dark' => 'dark:bg-yellow-500', 'light' => 'bg-yellow-800'],
            'V' => ['dark' => 'dark:bg-zinc-500', 'light' => 'bg-zinc-800'],
            'W' => ['dark' => 'dark:bg-neutral-500', 'light' => 'bg-neutral-800'],
            'X' => ['dark' => 'dark:bg-slate-500', 'light' => 'bg-slate-800'],
            'Y' => ['dark' => 'dark:bg-stone-500', 'light' => 'bg-stone-800'],
            'Z' => ['dark' => 'dark:bg-teal-500', 'light' => 'bg-teal-800'],
        ];

        $letter = strtoupper((string) $letter);

        return $colorReferences[$letter] ?? ['dark' => 'dark:bg-gray-500', 'light' => 'bg-gray-800'];

    }
}
