import random
import string

# Copied from https://github.com/andreasonny83/unique-names-generator/blob/main/src/dictionaries/adjectives.ts
_ADJECTIVES = [
    "able",
    "above",
    "absent",
    "absolute",
    "abstract",
    "abundant",
    "academic",
    "acceptable",
    "accepted",
    "accessible",
    "accurate",
    "accused",
    "active",
    "actual",
    "acute",
    "added",
    "additional",
    "adequate",
    "adjacent",
    "administrative",
    "adorable",
    "advanced",
    "adverse",
    "advisory",
    "aesthetic",
    "afraid",
    "aggregate",
    "aggressive",
    "agreeable",
    "agreed",
    "agricultural",
    "alert",
    "alive",
    "alleged",
    "allied",
    "alone",
    "alright",
    "alternative",
    "amateur",
    "amazing",
    "ambitious",
    "amused",
    "ancient",
    "angry",
    "annoyed",
    "annual",
    "anonymous",
    "apparent",
    "applicable",
    "appropriate",
    "arbitrary",
    "architectural",
    "armed",
    "artificial",
    "artistic",
    "asleep",
    "assistant",
    "associated",
    "atomic",
    "automatic",
    "autonomous",
    "available",
    "average",
    "awake",
    "aware",
    "awful",
    "back",
    "bad",
    "balanced",
    "bare",
    "basic",
    "beautiful",
    "beneficial",
    "better",
    "bewildered",
    "big",
    "binding",
    "biological",
    "bitter",
    "bizarre",
    "blank",
    "blonde",
    "bloody",
    "blushing",
    "boiling",
    "bold",
    "bored",
    "boring",
    "bottom",
    "brainy",
    "brave",
    "breakable",
    "breezy",
    "brief",
    "bright",
    "brilliant",
    "broad",
    "bumpy",
    "burning",
    "busy",
    "calm",
    "capable",
    "careful",
    "casual",
    "causal",
    "cautious",
    "central",
    "certain",
    "changing",
    "characteristic",
    "charming",
    "cheap",
    "cheerful",
    "chemical",
    "chief",
    "chilly",
    "chosen",
    "chronic",
    "chubby",
    "circular",
    "civic",
    "civil",
    "civilian",
    "classic",
    "classical",
    "clean",
    "clear",
    "clever",
    "clinical",
    "close",
    "closed",
    "cloudy",
    "clumsy",
    "coastal",
    "cognitive",
    "coherent",
    "cold",
    "collective",
    "colorful",
    "colossal",
    "coloured",
    "colourful",
    "combined",
    "comfortable",
    "coming",
    "commercial",
    "common",
    "compact",
    "comparable",
    "comparative",
    "compatible",
    "competent",
    "competitive",
    "complete",
    "complex",
    "complicated",
    "comprehensive",
    "compulsory",
    "conceptual",
    "concerned",
    "concrete",
    "confident",
    "confidential",
    "confused",
    "conscious",
    "conservation",
    "considerable",
    "consistent",
    "constant",
    "constitutional",
    "contemporary",
    "content",
    "continental",
    "continued",
    "continuing",
    "continuous",
    "controlled",
    "controversial",
    "convenient",
    "conventional",
    "convinced",
    "convincing",
    "cooing",
    "cool",
    "cooperative",
    "corporate",
    "correct",
    "corresponding",
    "costly",
    "courageous",
    "crazy",
    "creative",
    "critical",
    "crooked",
    "crowded",
    "crucial",
    "crude",
    "cruel",
    "cuddly",
    "cultural",
    "curious",
    "curly",
    "current",
    "curved",
    "cute",
    "daily",
    "damp",
    "dark",
    "deafening",
    "dear",
    "decent",
    "decisive",
    "deep",
    "defeated",
    "defensive",
    "defiant",
    "definite",
    "deliberate",
    "delicate",
    "delicious",
    "delighted",
    "delightful",
    "democratic",
    "dependent",
    "desirable",
    "desperate",
    "detailed",
    "determined",
    "developed",
    "developing",
    "devoted",
    "different",
    "difficult",
    "digital",
    "diplomatic",
    "direct",
    "dirty",
    "disappointed",
    "disciplinary",
    "distant",
    "distinct",
    "distinctive",
    "distinguished",
    "disturbed",
    "disturbing",
    "diverse",
    "divine",
    "dizzy",
    "domestic",
    "dominant",
    "double",
    "doubtful",
    "drab",
    "dramatic",
    "dreadful",
    "driving",
    "dry",
    "dual",
    "due",
    "dull",
    "dusty",
    "dutch",
    "dynamic",
    "eager",
    "early",
    "eastern",
    "easy",
    "economic",
    "educational",
    "eerie",
    "effective",
    "efficient",
    "elaborate",
    "elated",
    "eldest",
    "electoral",
    "electric",
    "electrical",
    "electronic",
    "elegant",
    "eligible",
    "embarrassed",
    "emotional",
    "empirical",
    "empty",
    "enchanting",
    "encouraging",
    "endless",
    "energetic",
    "enormous",
    "enthusiastic",
    "entire",
    "entitled",
    "envious",
    "environmental",
    "equal",
    "equivalent",
    "essential",
    "established",
    "estimated",
    "ethical",
    "ethnic",
    "eventual",
    "everyday",
    "evident",
    "evolutionary",
    "exact",
    "excellent",
    "exceptional",
    "excess",
    "excessive",
    "excited",
    "exciting",
    "exclusive",
    "existing",
    "exotic",
    "expected",
    "expensive",
    "experienced",
    "experimental",
    "extended",
    "extensive",
    "external",
    "extra",
    "extraordinary",
    "extreme",
    "exuberant",
    "faint",
    "fair",
    "faithful",
    "familiar",
    "famous",
    "fancy",
    "fantastic",
    "far",
    "fascinating",
    "fashionable",
    "fast",
    "fatal",
    "favourable",
    "favourite",
    "federal",
    "fellow",
    "female",
    "feminist",
    "few",
    "fierce",
    "final",
    "financial",
    "fine",
    "firm",
    "fiscal",
    "fit",
    "fixed",
    "flat",
    "flexible",
    "fluffy",
    "fluttering",
    "flying",
    "following",
    "fond",
    "foolish",
    "foreign",
    "formal",
    "formidable",
    "forthcoming",
    "fortunate",
    "forward",
    "fragile",
    "frail",
    "frantic",
    "free",
    "frequent",
    "fresh",
    "friendly",
    "frightened",
    "front",
    "frozen",
    "full",
    "fun",
    "functional",
    "fundamental",
    "funny",
    "furious",
    "future",
    "fuzzy",
    "gastric",
    "general",
    "generous",
    "genetic",
    "gentle",
    "genuine",
    "geographical",
    "giant",
    "gigantic",
    "given",
    "glad",
    "glamorous",
    "gleaming",
    "global",
    "glorious",
    "golden",
    "good",
    "gorgeous",
    "gothic",
    "governing",
    "graceful",
    "gradual",
    "grand",
    "grateful",
    "greasy",
    "great",
    "grieving",
    "grim",
    "growing",
    "grubby",
    "grumpy",
    "guilty",
    "handsome",
    "happy",
    "hard",
    "harsh",
    "head",
    "healthy",
    "heavy",
    "helpful",
    "helpless",
    "hidden",
    "high",
    "hilarious",
    "hissing",
    "historic",
    "historical",
    "hollow",
    "homely",
    "hon",
    "honest",
    "horizontal",
    "hostile",
    "huge",
    "human",
    "hungry",
    "hurt",
    "hushed",
    "husky",
    "icy",
    "ideal",
    "identical",
    "ideological",
    "ill",
    "imaginative",
    "immediate",
    "immense",
    "imperial",
    "implicit",
    "important",
    "impossible",
    "impressed",
    "impressive",
    "improved",
    "inadequate",
    "inc",
    "inclined",
    "increased",
    "increasing",
    "incredible",
    "independent",
    "indirect",
    "individual",
    "industrial",
    "inevitable",
    "influential",
    "informal",
    "inherent",
    "initial",
    "injured",
    "inland",
    "inner",
    "innocent",
    "innovative",
    "inquisitive",
    "instant",
    "institutional",
    "insufficient",
    "intact",
    "integral",
    "integrated",
    "intellectual",
    "intelligent",
    "intense",
    "intensive",
    "interested",
    "interesting",
    "interim",
    "interior",
    "intermediate",
    "internal",
    "international",
    "intimate",
    "invisible",
    "involved",
    "irrelevant",
    "isolated",
    "itchy",
    "jealous",
    "jittery",
    "joint",
    "jolly",
    "joyous",
    "judicial",
    "juicy",
    "junior",
    "just",
    "keen",
    "key",
    "kind",
    "known",
    "labour",
    "large",
    "late",
    "latin",
    "lazy",
    "leading",
    "left",
    "legal",
    "legislative",
    "legitimate",
    "lengthy",
    "lesser",
    "level",
    "lexical",
    "liable",
    "light",
    "like",
    "likely",
    "limited",
    "linear",
    "linguistic",
    "liquid",
    "literary",
    "little",
    "live",
    "lively",
    "living",
    "local",
    "logical",
    "lonely",
    "long",
    "loose",
    "lost",
    "loud",
    "lovely",
    "low",
    "loyal",
    "ltd",
    "lucky",
    "mad",
    "magic",
    "magnetic",
    "magnificent",
    "main",
    "major",
    "male",
    "mammoth",
    "managerial",
    "managing",
    "manual",
    "many",
    "marginal",
    "marine",
    "marked",
    "married",
    "marvellous",
    "marxist",
    "mass",
    "massive",
    "mathematical",
    "mature",
    "maximum",
    "mean",
    "meaningful",
    "mechanical",
    "medical",
    "medieval",
    "melodic",
    "melted",
    "mere",
    "metropolitan",
    "mid",
    "middle",
    "mighty",
    "mild",
    "military",
    "miniature",
    "minimal",
    "minimum",
    "ministerial",
    "minor",
    "miserable",
    "missing",
    "misty",
    "mixed",
    "moaning",
    "mobile",
    "moderate",
    "modern",
    "modest",
    "molecular",
    "monetary",
    "monthly",
    "moral",
    "motionless",
    "muddy",
    "multiple",
    "mushy",
    "musical",
    "mute",
    "mutual",
    "mysterious",
    "narrow",
    "national",
    "native",
    "natural",
    "naval",
    "near",
    "nearby",
    "neat",
    "necessary",
    "negative",
    "neighbouring",
    "nervous",
    "net",
    "neutral",
    "new",
    "nice",
    "noble",
    "noisy",
    "normal",
    "northern",
    "nosy",
    "notable",
    "novel",
    "numerous",
    "nutritious",
    "nutty",
    "obedient",
    "objective",
    "obliged",
    "obvious",
    "occasional",
    "occupational",
    "odd",
    "official",
    "ok",
    "okay",
    "old",
    "olympic",
    "only",
    "open",
    "operational",
    "opposite",
    "optimistic",
    "oral",
    "ordinary",
    "organic",
    "organisational",
    "original",
    "other",
    "outdoor",
    "outer",
    "outrageous",
    "outside",
    "outstanding",
    "overall",
    "overseas",
    "overwhelming",
    "painful",
    "pale",
    "panicky",
    "parallel",
    "parental",
    "parliamentary",
    "partial",
    "particular",
    "passing",
    "passive",
    "past",
    "patient",
    "payable",
    "peaceful",
    "peculiar",
    "perfect",
    "permanent",
    "persistent",
    "personal",
    "petite",
    "philosophical",
    "physical",
    "plain",
    "planned",
    "plastic",
    "pleasant",
    "pleased",
    "poised",
    "polite",
    "political",
    "popular",
    "positive",
    "possible",
    "potential",
    "powerful",
    "practical",
    "precious",
    "precise",
    "preferred",
    "preliminary",
    "premier",
    "prepared",
    "present",
    "presidential",
    "pretty",
    "previous",
    "prickly",
    "primary",
    "prime",
    "primitive",
    "principal",
    "printed",
    "prior",
    "private",
    "probable",
    "productive",
    "professional",
    "profitable",
    "profound",
    "progressive",
    "prominent",
    "promising",
    "proper",
    "proposed",
    "prospective",
    "protective",
    "protestant",
    "proud",
    "provincial",
    "psychological",
    "public",
    "puny",
    "pure",
    "purring",
    "puzzled",
    "quaint",
    "qualified",
    "quarrelsome",
    "querulous",
    "quick",
    "quickest",
    "quiet",
    "quintessential",
    "quixotic",
    "radical",
    "rainy",
    "random",
    "rapid",
    "rare",
    "raspy",
    "rational",
    "raw",
    "ready",
    "real",
    "realistic",
    "rear",
    "reasonable",
    "recent",
    "reduced",
    "redundant",
    "regional",
    "registered",
    "regular",
    "regulatory",
    "related",
    "relative",
    "relaxed",
    "relevant",
    "reliable",
    "relieved",
    "reluctant",
    "remaining",
    "remarkable",
    "remote",
    "renewed",
    "representative",
    "required",
    "resident",
    "residential",
    "resonant",
    "respectable",
    "respective",
    "responsible",
    "resulting",
    "retail",
    "retired",
    "revolutionary",
    "rich",
    "ridiculous",
    "right",
    "rigid",
    "ripe",
    "rising",
    "rival",
    "roasted",
    "robust",
    "rolling",
    "romantic",
    "rough",
    "round",
    "royal",
    "rubber",
    "rude",
    "ruling",
    "running",
    "rural",
    "sacred",
    "sad",
    "safe",
    "salty",
    "satisfactory",
    "satisfied",
    "scared",
    "scary",
    "scattered",
    "scientific",
    "scornful",
    "scrawny",
    "screeching",
    "secondary",
    "secret",
    "secure",
    "select",
    "selected",
    "selective",
    "selfish",
    "semantic",
    "senior",
    "sensible",
    "sensitive",
    "separate",
    "serious",
    "severe",
    "shaggy",
    "shaky",
    "shallow",
    "shared",
    "sharp",
    "sheer",
    "shiny",
    "shivering",
    "shocked",
    "short",
    "shrill",
    "shy",
    "sick",
    "significant",
    "silent",
    "silky",
    "silly",
    "similar",
    "simple",
    "single",
    "skilled",
    "skinny",
    "sleepy",
    "slight",
    "slim",
    "slimy",
    "slippery",
    "slow",
    "small",
    "smart",
    "smiling",
    "smoggy",
    "smooth",
    "social",
    "soft",
    "solar",
    "sole",
    "solid",
    "sophisticated",
    "sore",
    "sorry",
    "sound",
    "sour",
    "southern",
    "spare",
    "sparkling",
    "spatial",
    "special",
    "specific",
    "specified",
    "spectacular",
    "spicy",
    "spiritual",
    "splendid",
    "spontaneous",
    "sporting",
    "spotless",
    "spotty",
    "square",
    "squealing",
    "stable",
    "stale",
    "standard",
    "static",
    "statistical",
    "statutory",
    "steady",
    "steep",
    "sticky",
    "stiff",
    "still",
    "stingy",
    "stormy",
    "straight",
    "straightforward",
    "strange",
    "strategic",
    "strict",
    "striking",
    "striped",
    "strong",
    "structural",
    "stuck",
    "subjective",
    "subsequent",
    "substantial",
    "subtle",
    "successful",
    "successive",
    "sudden",
    "sufficient",
    "suitable",
    "sunny",
    "super",
    "superb",
    "superior",
    "supporting",
    "supposed",
    "supreme",
    "sure",
    "surprised",
    "surprising",
    "surrounding",
    "surviving",
    "suspicious",
    "sweet",
    "swift",
    "symbolic",
    "sympathetic",
    "systematic",
    "tall",
    "tame",
    "tart",
    "tasteless",
    "tasty",
    "technical",
    "technological",
    "teenage",
    "temporary",
    "tender",
    "tense",
    "terrible",
    "territorial",
    "testy",
    "then",
    "theoretical",
    "thin",
    "thirsty",
    "thorough",
    "thoughtful",
    "thoughtless",
    "thundering",
    "tight",
    "tiny",
    "tired",
    "top",
    "tory",
    "total",
    "tough",
    "traditional",
    "tragic",
    "tremendous",
    "tricky",
    "tropical",
    "troubled",
    "typical",
    "ultimate",
    "unable",
    "unaware",
    "uncertain",
    "unchanged",
    "underground",
    "underlying",
    "uneven",
    "unfair",
    "uniform",
    "uninterested",
    "unique",
    "united",
    "universal",
    "unknown",
    "unlikely",
    "unusual",
    "unwilling",
    "upper",
    "upset",
    "urban",
    "urgent",
    "used",
    "useful",
    "usual",
    "vague",
    "valid",
    "valuable",
    "variable",
    "varied",
    "various",
    "varying",
    "vast",
    "verbal",
    "vertical",
    "very",
    "vicarious",
    "vicious",
    "victorious",
    "violent",
    "visible",
    "visiting",
    "visual",
    "vital",
    "vitreous",
    "vivacious",
    "vivid",
    "vocal",
    "vocational",
    "voiceless",
    "voluminous",
    "voluntary",
    "vulnerable",
    "wandering",
    "warm",
    "watery",
    "weak",
    "wealthy",
    "weary",
    "wee",
    "weekly",
    "weird",
    "welcome",
    "well",
    "western",
    "wet",
    "whispering",
    "whole",
    "wide",
    "widespread",
    "wild",
    "wilful",
    "willing",
    "willowy",
    "wily",
    "wise",
    "wispy",
    "wittering",
    "witty",
    "wonderful",
    "wooden",
    "working",
    "worldwide",
    "worried",
    "worthwhile",
    "worthy",
    "written",
    "wrong",
    "xenacious",
    "xenial",
    "xenogeneic",
    "xeric",
    "xerothermic",
    "yabbering",
    "yammering",
    "yappiest",
    "yappy",
    "yawning",
    "yearling",
    "yearning",
    "yeasty",
    "yelling",
    "yelping",
    "yielding",
    "yodelling",
    "young",
    "youngest",
    "youthful",
    "ytterbic",
    "yucky",
    "yummy",
    "zany",
    "zealous",
    "zeroth",
    "zestful",
    "zesty",
    "zippy",
    "zonal",
    "zoophagous",
    "zygomorphic",
    "zygotic",
]

# Copied from https://github.com/andreasonny83/unique-names-generator/blob/main/src/dictionaries/colors.ts
_COLORS = [
    "amaranth",
    "amber",
    "amethyst",
    "apricot",
    "aqua",
    "aquamarine",
    "azure",
    "beige",
    "blue",
    "blush",
    "bronze",
    "chocolate",
    "coffee",
    "copper",
    "coral",
    "crimson",
    "cyan",
    "emerald",
    "fuchsia",
    "gold",
    "gray",
    "green",
    "indigo",
    "ivory",
    "jade",
    "lavender",
    "lime",
    "magenta",
    "maroon",
    "moccasin",
    "olive",
    "orange",
    "peach",
    "pink",
    "plum",
    "purple",
    "red",
    "rose",
    "salmon",
    "sapphire",
    "scarlet",
    "silver",
    "tan",
    "teal",
    "tomato",
    "turquoise",
    "violet",
    "yellow",
]


def random_unique_name() -> str:
    """Generate a random unique name in the form ``<adjective>-<color>-<4 chars>``.

    Returns:
        str: A randomly generated name, e.g. ``"brave-coral-x7k2"``.
    """
    suffix = "".join(random.choices(string.ascii_lowercase + string.digits, k=4))
    return f"{random.choice(_ADJECTIVES)}-{random.choice(_COLORS)}-{suffix}"
