#! /usr/bin/env bash

# This Tab Completion script was generated by the Cova Library.
# Details at https://github.com/00JCIV00/cova


# Bash Completion Installation Instructions for covademo
# 1. Place this script in a directory like /etc/bash_completion.d/ (Linux)
#    or /usr/local/etc/bash_completion.d/ (Mac, if using Homebrew and bash-completion)
#
# 2. Ensure the script has executable permissions:
#    chmod +x covademo-completion.bash
#
# 3. Source this script from your .bashrc or .bash_profile by adding:
#    . /path/to/covademo-completion.bash
#
# 4. Restart your terminal session or source your profile again:
#    source ~/.bashrc  # or ~/.bash_profile


_covademo_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "sub-cmd")
            _covademo_sub-cmd_completions
            ;;
        "basic")
            _covademo_basic_completions
            ;;
        "nest-1")
            _covademo_nest-1_completions
            ;;
        "struct-cmd")
            _covademo_struct-cmd_completions
            ;;
        "union-cmd")
            _covademo_union-cmd_completions
            ;;
        "fn-cmd")
            _covademo_fn-cmd_completions
            ;;
        "add-user")
            _covademo_add-user_completions
            ;;
        "covademo")
            COMPREPLY=($(compgen -W "sub-cmd basic nest-1 struct-cmd union-cmd fn-cmd add-user help usage --string --int --float --file --ordinal --cardinal --toggle --bool --verbosity --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_sub-cmd_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "sub-cmd")
            COMPREPLY=($(compgen -W "help usage --nested_str --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_basic_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "basic")
            COMPREPLY=($(compgen -W "help usage --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_nest-1_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "nest-2")
            _covademonest-1_nest-2_completions
            ;;
        "nest-1")
            COMPREPLY=($(compgen -W "nest-2 help usage --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_nest-1_nest-2_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "nest-3")
            _covademo_nest-1nest-2_nest-3_completions
            ;;
        "nest-2")
            COMPREPLY=($(compgen -W "nest-3 help usage --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_nest-1_nest-2_nest-3_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "nest-4")
            _covademo_nest-1_nest-2nest-3_nest-4_completions
            ;;
        "nest-3")
            COMPREPLY=($(compgen -W "nest-4 help usage --inheritable --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_nest-1_nest-2_nest-3_nest-4_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "nest-4")
            COMPREPLY=($(compgen -W "help usage --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_struct-cmd_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "inner-cmd")
            _covademostruct-cmd_inner-cmd_completions
            ;;
        "struct-cmd")
            COMPREPLY=($(compgen -W "inner-cmd help usage --int --str --str2 --flt --int2 --multi-int --multi-str --rgb-enum --struct-bool --struct-str --struct-int --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_struct-cmd_inner-cmd_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "inner-cmd")
            COMPREPLY=($(compgen -W "help usage --in-bool --in-float --h-string --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_union-cmd_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "union-cmd")
            COMPREPLY=($(compgen -W "help usage --int --str --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_fn-cmd_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "fn-cmd")
            COMPREPLY=($(compgen -W "help usage --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}

_covademo_add-user_completions() {
    local cur prev
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD - 1]}"

    case "${prev}" in
        "add-user")
            COMPREPLY=($(compgen -W "help usage --fname --lname --age --admin --ref-ids --help --usage" -- ${cur}))
            ;;
        *)
            COMPREPLY=($(compgen -f -- ${cur}))
    esac
}


complete -F _covademo_completions covademo