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

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" "Des paillettes — gum"
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo "$g❯$b gum style — bordures, couleurs, padding$n"
gum style --foreground 212 --border rounded --padding "1 2" "Hello from gum!"
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo
echo "$g❯$b gum table — données structurées$n"
printf '%s\n' "Commande,Rôle" "gum style, Texte stylisé" "gum table, Tableaux" "gum pager, Pagination" "gum choose, Menus" "gum confirm, Confirmations" "gum spin, Spinners" | gum table -p -s "," --columns "Commande,Rôle" --widths 14,30 --border rounded
gum spin --spinner.foreground "$s" --spinner dot --title " " -- fish -c read

echo
echo "$g❯$b gum pager — paginer un fichier$n"
batcat -p ~/.gitconfig
