#!/bin/bash
_infra_caddy_completions_build() {
  # List of available options for the "container" command
  local commands=(
    "help"
    "introduce"
    "intro"
    "init"
    "reload-caddy"
    "join-caddy"
    "disconnect-caddy"
    "list"
    "enable-"
    "stop-"
    "start-"
    "restart-"
    "remove-"
    "log-"
    "logs"
    "install"
    "delete"
    "stop"
    "start"
    "restart"
    "basic-auth"
    "delete-basic-auth"
    "add-whitelist-ips"
    "delete-whitelist-ips"
    "remove-block-ips"
    "add-static-site"
    "delete-static-site"
    "add-reverse-proxy"
    "delete-reverse-proxy"
    "add-load-balancer"
    "delete-load-balancer"
    "delete-load-balancer-backend"
    "add-php-app"
    "delete-php-app"
    "laravel-apache-up"
    "laravel-up"
    "laravel-down"
    "laravel-restore"
    "laravel-remove"
    "add-node-app"
    "delete-node-app"
    "node-up"
    "node-down"
    "node-restore"
    "node-remove"
    "go"
    "self-update"
    "docker-disk"
    "clean-build-cache"
    "buildx-multi-platform"
    "setup-mtproto-proxy"
    "setup-telegram-proxy"
  )
  local cur="${COMP_WORDS[COMP_CWORD]}"
  mapfile -t COMPREPLY < <(compgen -W "${commands[*]}" -- "$cur")
}
complete -F _infra_caddy_completions_build infra-caddy
complete -F _infra_caddy_completions_build bear-caddy
