/**
 * A small registry of curated color palettes that can be reused
 * wherever Lime CRM needs to assign distinct colors to a list of
 * items — tag swatches, kanban swimlanes, multi-series visuals,
 * legend entries, chart buckets, and so on. Palettes are stored as
 * plain CSS color strings so consumers can hand them straight to a
 * component prop or to inline `style` without further conversion.
 *
 * The default palettes lean on the Lime Extended color palette via
 * `rgb(var(--color-…))` so they pick up dark / light mode
 * automatically. The color-blind-friendly palette uses Wong (2011)
 * hex values verbatim — those are tuned for distinguishability and
 * substituting Lime's nearest neighbours would defeat the purpose.
 *
 * :::important
 * **Append-only:** consumers assign colors by index (often modulo
 * the palette length), so to keep already-saved configurations
 * stable across releases, never reorder or replace existing colors
 * in a palette — only append new ones at the end.
 * :::
 */
/**
 * Built-in palettes. Order matters — pickers should render them in
 * this order, with the first entry being the most generally useful
 * default.
 *
 * @beta
 */
export const COLOR_PALETTES = [
    {
        id: 'lime-ui',
        title: 'Lime UI',
        description: 'Vibrant, well-balanced colors drawn from the Lime UI palette. A safe default.',
        colors: [
            'rgb(var(--color-blue-default))',
            'rgb(var(--color-orange-default))',
            'rgb(var(--color-teal-default))',
            'rgb(var(--color-purple-default))',
            'rgb(var(--color-amber-default))',
            'rgb(var(--color-sky-default))',
            'rgb(var(--color-pink-default))',
            'rgb(var(--color-lime-default))',
            'rgb(var(--color-green-default))',
            'rgb(var(--color-magenta-default))',
        ],
    },
    {
        id: 'soft-pastels',
        title: 'Soft pastels',
        description: 'Light, easy-on-the-eyes shades. Good for dense visuals where the colors should not dominate.',
        colors: [
            'rgb(var(--color-blue-light))',
            'rgb(var(--color-orange-light))',
            'rgb(var(--color-teal-light))',
            'rgb(var(--color-purple-light))',
            'rgb(var(--color-amber-light))',
            'rgb(var(--color-pink-light))',
            'rgb(var(--color-lime-light))',
            'rgb(var(--color-gray-light))',
            'rgb(var(--color-sky-light))',
            'rgb(var(--color-green-light))',
        ],
    },
    {
        id: 'earth-tones',
        title: 'Earth tones',
        description: 'Warm, organic shades. Reads calmly without grabbing attention; pairs well with neutral surfaces.',
        colors: [
            'rgb(var(--color-brown-default))',
            'rgb(var(--color-orange-dark))',
            'rgb(var(--color-amber-default))',
            'rgb(var(--color-coral-dark))',
            'rgb(var(--color-lime-dark))',
            'rgb(var(--color-glaucous-default))',
            'rgb(var(--color-yellow-dark))',
            'rgb(var(--color-gray-dark))',
            'rgb(var(--color-red-dark))',
            'rgb(var(--color-green-dark))',
        ],
    },
    {
        id: 'cool-blues',
        title: 'Cool blues',
        description: 'Single-hue gradient from light to deep blue. Good for sequential or ordered values — magnitude, ranks, intensity.',
        colors: [
            'rgb(var(--color-sky-lighter))',
            'rgb(var(--color-blue-lighter))',
            'rgb(var(--color-sky-light))',
            'rgb(var(--color-blue-light))',
            'rgb(var(--color-blue-default))',
            'rgb(var(--color-blue-dark))',
            'rgb(var(--color-indigo-default))',
            'rgb(var(--color-indigo-dark))',
            'rgb(var(--color-blue-darker))',
            'rgb(var(--color-indigo-darker))',
        ],
    },
    {
        id: 'sunset',
        title: 'Sunset',
        description: 'Warm gradient from yellow through orange to deep pink. Good for intensity or urgency.',
        colors: [
            'rgb(var(--color-yellow-light))',
            'rgb(var(--color-amber-light))',
            'rgb(var(--color-amber-default))',
            'rgb(var(--color-orange-default))',
            'rgb(var(--color-coral-default))',
            'rgb(var(--color-coral-dark))',
            'rgb(var(--color-pink-default))',
            'rgb(var(--color-pink-dark))',
            'rgb(var(--color-magenta-dark))',
            'rgb(var(--color-purple-darker))',
        ],
    },
    {
        id: 'ocean',
        title: 'Ocean',
        description: 'Cool gradient from pale cyan through teal to deep navy. Good for sequential values where warmth would feel out of place.',
        colors: [
            'rgb(var(--color-cyan-lighter))',
            'rgb(var(--color-cyan-light))',
            'rgb(var(--color-cyan-default))',
            'rgb(var(--color-teal-light))',
            'rgb(var(--color-teal-default))',
            'rgb(var(--color-teal-dark))',
            'rgb(var(--color-blue-default))',
            'rgb(var(--color-blue-dark))',
            'rgb(var(--color-indigo-darker))',
            'rgb(var(--color-blue-darker))',
        ],
    },
    {
        id: 'jewel-tones',
        title: 'Jewel tones',
        description: 'Rich, saturated colors with a slight retro feel. Good when you want each item to feel substantial and distinctive.',
        colors: [
            'rgb(var(--color-violet-dark))',
            'rgb(var(--color-magenta-dark))',
            'rgb(var(--color-teal-dark))',
            'rgb(var(--color-amber-dark))',
            'rgb(var(--color-red-dark))',
            'rgb(var(--color-indigo-dark))',
            'rgb(var(--color-purple-dark))',
            'rgb(var(--color-pink-dark))',
            'rgb(var(--color-blue-darker))',
            'rgb(var(--color-green-dark))',
        ],
    },
    {
        id: 'forest',
        title: 'Forest',
        description: 'Greens, mosses and woods. Calm and natural; good when colors should feel grounded rather than corporate.',
        colors: [
            'rgb(var(--color-green-default))',
            'rgb(var(--color-lime-default))',
            'rgb(var(--color-teal-default))',
            'rgb(var(--color-brown-default))',
            'rgb(var(--color-amber-default))',
            'rgb(var(--color-glaucous-default))',
            'rgb(var(--color-gray-default))',
            'rgb(var(--color-green-dark))',
            'rgb(var(--color-lime-dark))',
            'rgb(var(--color-yellow-dark))',
        ],
    },
    {
        id: 'status',
        title: 'Status',
        description: 'Green-yellow-red traffic-light gradient. Good for risk, severity, or health.',
        colors: [
            'rgb(var(--color-green-default))',
            'rgb(var(--color-lime-default))',
            'rgb(var(--color-grass-default))',
            'rgb(var(--color-yellow-default))',
            'rgb(var(--color-amber-default))',
            'rgb(var(--color-orange-default))',
            'rgb(var(--color-coral-default))',
            'rgb(var(--color-red-default))',
            'rgb(var(--color-red-dark))',
            'rgb(var(--color-red-darker))',
        ],
    },
    {
        id: 'colorblind-friendly',
        title: 'Color-blind friendly',
        description: 'Distinguishable for the most common forms of color-vision deficiency. Based on Wong (2011) and used verbatim — no dark-mode shifting.',
        colors: [
            '#0072B2', // blue
            '#E69F00', // orange
            '#009E73', // bluish green
            '#CC79A7', // reddish purple
            '#56B4E9', // sky blue
            '#D55E00', // vermillion
            '#F0E442', // yellow
            '#000000', // black
            '#117733', // dark green (Tol)
            '#999999', // medium gray
        ],
    },
    {
        id: 'candy-shop',
        title: 'Candy shop',
        description: 'Bright, playful colors with a sweet-tooth feel. Good for friendly or informal contexts where the chart should look approachable rather than corporate.',
        colors: [
            'rgb(var(--color-pink-light))',
            'rgb(var(--color-yellow-light))',
            'rgb(var(--color-sky-light))',
            'rgb(var(--color-lime-light))',
            'rgb(var(--color-coral-light))',
            'rgb(var(--color-purple-light))',
            'rgb(var(--color-amber-light))',
            'rgb(var(--color-magenta-light))',
            'rgb(var(--color-cyan-light))',
            'rgb(var(--color-orange-light))',
        ],
    },
    {
        id: 'berry-bowl',
        title: 'Berry bowl',
        description: 'Deep, saturated berries — raspberry, blackcurrant, plum. Reads bold without feeling neon; pairs well with light surfaces.',
        colors: [
            'rgb(var(--color-magenta-dark))',
            'rgb(var(--color-purple-dark))',
            'rgb(var(--color-pink-dark))',
            'rgb(var(--color-red-dark))',
            'rgb(var(--color-violet-dark))',
            'rgb(var(--color-indigo-dark))',
            'rgb(var(--color-coral-dark))',
            'rgb(var(--color-amber-dark))',
            'rgb(var(--color-magenta-darker))',
            'rgb(var(--color-purple-darker))',
        ],
    },
    {
        id: 'tropical',
        title: 'Tropical',
        description: 'Reef-and-palm warmth — corals, teals, limes and ambers in equal measure. Lively without being loud.',
        colors: [
            'rgb(var(--color-coral-default))',
            'rgb(var(--color-teal-default))',
            'rgb(var(--color-amber-default))',
            'rgb(var(--color-cyan-default))',
            'rgb(var(--color-lime-default))',
            'rgb(var(--color-pink-default))',
            'rgb(var(--color-orange-default))',
            'rgb(var(--color-sky-default))',
            'rgb(var(--color-yellow-default))',
            'rgb(var(--color-magenta-default))',
        ],
    },
    {
        id: 'slate',
        title: 'Slate',
        description: 'Soft neutrals — grays, glaucous and warm browns. Calm and unobtrusive; good when one or two highlight series should stand out via accent colors.',
        colors: [
            'rgb(var(--color-glaucous-default))',
            'rgb(var(--color-brown-default))',
            'rgb(var(--color-gray-default))',
            'rgb(var(--color-glaucous-light))',
            'rgb(var(--color-brown-light))',
            'rgb(var(--color-gray-light))',
            'rgb(var(--color-glaucous-dark))',
            'rgb(var(--color-brown-dark))',
            'rgb(var(--color-gray-dark))',
            'rgb(var(--color-glaucous-darker))',
        ],
    },
    {
        id: 'sage',
        title: 'Sage',
        description: 'Muted greens, teals and herbs. Reads quiet and natural; good for long-running dashboards where the data should breathe.',
        colors: [
            'rgb(var(--color-green-light))',
            'rgb(var(--color-teal-light))',
            'rgb(var(--color-lime-light))',
            'rgb(var(--color-grass-light))',
            'rgb(var(--color-glaucous-light))',
            'rgb(var(--color-cyan-light))',
            'rgb(var(--color-green-lighter))',
            'rgb(var(--color-teal-lighter))',
            'rgb(var(--color-lime-lighter))',
            'rgb(var(--color-grass-lighter))',
        ],
    },
    {
        id: 'dusty-rose',
        title: 'Dusty rose',
        description: 'Faded pinks, mauves and warm sands — like dried flowers. Soft and friendly without feeling sugary.',
        colors: [
            'rgb(var(--color-pink-lighter))',
            'rgb(var(--color-coral-lighter))',
            'rgb(var(--color-amber-lighter))',
            'rgb(var(--color-violet-lighter))',
            'rgb(var(--color-magenta-lighter))',
            'rgb(var(--color-purple-lighter))',
            'rgb(var(--color-pink-light))',
            'rgb(var(--color-coral-light))',
            'rgb(var(--color-violet-light))',
            'rgb(var(--color-brown-light))',
        ],
    },
    {
        id: 'morning-mist',
        title: 'Morning mist',
        description: 'Pale cool tones — sky, fog and frost. Good when the chart should feel airy and recede behind labels or annotations.',
        colors: [
            'rgb(var(--color-sky-lighter))',
            'rgb(var(--color-blue-lighter))',
            'rgb(var(--color-cyan-lighter))',
            'rgb(var(--color-teal-lighter))',
            'rgb(var(--color-violet-lighter))',
            'rgb(var(--color-indigo-lighter))',
            'rgb(var(--color-glaucous-light))',
            'rgb(var(--color-gray-lighter))',
            'rgb(var(--color-purple-lighter))',
            'rgb(var(--color-green-lighter))',
        ],
    },
];
/**
 * Look up a palette by id. Returns `undefined` when the id is
 * unknown; callers typically fall back to `COLOR_PALETTES[0]`.
 * @param id - the palette's stable id (see {@link ColorPalette.id}).
 *
 * @beta
 */
export function getColorPalette(id) {
    return COLOR_PALETTES.find((palette) => palette.id === id);
}
