#compdef eruption-netfx

autoload -U is-at-least

_eruption-netfx() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" \
'*-v[Verbose mode (-v, -vv, -vvv, etc.)]' \
'*--verbose[Verbose mode (-v, -vv, -vvv, etc.)]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::model -- The keyboard model, e.g. "ROCCAT Vulcan Pro TKL" or "1e7d\:311a":' \
'::hostname:' \
'::port:' \
":: :_eruption-netfx_commands" \
"*::: :->eruption-netfx" \
&& ret=0
    case $state in
    (eruption-netfx)
        words=($line[4] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:eruption-netfx-command-$line[4]:"
        case $line[4] in
            (ping)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(command)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':data:' \
&& ret=0
;;
(image)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':filename:_files' \
&& ret=0
;;
(animation)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':directory_name:_files' \
'::frame_delay:' \
&& ret=0
;;
(ambient)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
'::frame_delay:' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
":: :_eruption-netfx__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:eruption-netfx-help-command-$line[1]:"
        case $line[1] in
            (ping)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(command)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(image)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(animation)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(ambient)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_eruption-netfx_commands] )) ||
_eruption-netfx_commands() {
    local commands; commands=(
'ping:Ping the server' \
'command:Send Network FX raw protocol commands to the server' \
'image:Load an image file and display it on the connected devices' \
'animation:Load image files from a directory and display each one on the connected devices' \
'ambient:Make the LEDs of connected devices reflect what is shown on the screen' \
'completions:Generate shell completions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'eruption-netfx commands' commands "$@"
}
(( $+functions[_eruption-netfx__ambient_commands] )) ||
_eruption-netfx__ambient_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx ambient commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__ambient_commands] )) ||
_eruption-netfx__help__ambient_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help ambient commands' commands "$@"
}
(( $+functions[_eruption-netfx__animation_commands] )) ||
_eruption-netfx__animation_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx animation commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__animation_commands] )) ||
_eruption-netfx__help__animation_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help animation commands' commands "$@"
}
(( $+functions[_eruption-netfx__command_commands] )) ||
_eruption-netfx__command_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx command commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__command_commands] )) ||
_eruption-netfx__help__command_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help command commands' commands "$@"
}
(( $+functions[_eruption-netfx__completions_commands] )) ||
_eruption-netfx__completions_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx completions commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__completions_commands] )) ||
_eruption-netfx__help__completions_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help completions commands' commands "$@"
}
(( $+functions[_eruption-netfx__help_commands] )) ||
_eruption-netfx__help_commands() {
    local commands; commands=(
'ping:Ping the server' \
'command:Send Network FX raw protocol commands to the server' \
'image:Load an image file and display it on the connected devices' \
'animation:Load image files from a directory and display each one on the connected devices' \
'ambient:Make the LEDs of connected devices reflect what is shown on the screen' \
'completions:Generate shell completions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'eruption-netfx help commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__help_commands] )) ||
_eruption-netfx__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help help commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__image_commands] )) ||
_eruption-netfx__help__image_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help image commands' commands "$@"
}
(( $+functions[_eruption-netfx__image_commands] )) ||
_eruption-netfx__image_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx image commands' commands "$@"
}
(( $+functions[_eruption-netfx__help__ping_commands] )) ||
_eruption-netfx__help__ping_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx help ping commands' commands "$@"
}
(( $+functions[_eruption-netfx__ping_commands] )) ||
_eruption-netfx__ping_commands() {
    local commands; commands=()
    _describe -t commands 'eruption-netfx ping commands' commands "$@"
}

if [ "$funcstack[1]" = "_eruption-netfx" ]; then
    _eruption-netfx "$@"
else
    compdef _eruption-netfx eruption-netfx
fi
