#!/usr/bin/env fish
mise env -s fish | source

export NO_SPLASHBOARD=1

set -l g (set_color a6d189)
set -l b (set_color 8caaee)
set -l s '#8caaee'
set -l n (set_color normal)

gum style --foreground "$s" --border double --padding "1 2" --margin "1" "Starship — Le prompt cross-shell"

echo
set chosen (printf '%s\n' \
    "java/gaia,Java (Maven) — temurin-21 / 1.2.0" \
    "java/gitlab-classrooms,Java (Maven) — temurin-25 / 2.1.0-SNAPSHOT" \
    "node-project,Node.js — 1.1.0" \
    "terraform/blog-on-clever,Terraform — 1.5.0 / staging" \
    "terraform/spindle-on-scaleway,Terraform — 1.15 / production" \
    "kube/dev,Kubernetes — dev-cluster" \
    "kube/prod,Kubernetes — prod-cluster" \
    "starship-themes/pastel-powerline,Starship — Preset Pastel Powerline" \
    "starship-themes/catppuccin-powerline,Starship — Preset Catppuccin Frappe" \
    "starship-themes/jetpack,Starship — Preset Jetpack" |
    gum table --height 12 -s "," --columns "Répertoire,Détails" --widths 34,50 --border rounded --return-column 1)

if test -n "$chosen"
    echo "cd $chosen" >"$DEMO_CD_FILE"
end
