#compdef ikona-cli

autoload -U is-at-least

_ikona-cli() {
    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[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_ikona-cli_commands" \
"*::: :->ikona-cli" \
&& ret=0
    case $state in
    (ikona-cli)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:ikona-cli-command-$line[1]:"
        case $line[1] in
            (optimize)
_arguments "${_arguments_options[@]}" \
'-m+[Sets optimization method to use]: :(all rsvg scour)' \
'--mode=[Sets optimization method to use]: :(all rsvg scour)' \
'-i[Modifies the icon in-place]' \
'--inplace[Modifies the icon in-place]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':input -- Sets the input file to read from:_files' \
'::output -- Sets the output file to write to:_files' \
&& ret=0
;;
(class)
_arguments "${_arguments_options[@]}" \
'-m+[Sets what type of icon to treat the icon as]: :(light dark)' \
'--mode=[Sets what type of icon to treat the icon as]: :(light dark)' \
'-i[Modifies the icon in-place]' \
'--inplace[Modifies the icon in-place]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':input -- Sets the input file to read from:_files' \
'::output -- Sets the output file to write to:_files' \
&& ret=0
;;
(convert)
_arguments "${_arguments_options[@]}" \
'-t+[Sets the type of icon to convert to]: :(light dark)' \
'--target=[Sets the type of icon to convert to]: :(light dark)' \
'-i[Modifies the icon in-place]' \
'--inplace[Modifies the icon in-place]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':input -- Sets the input file to read from:_files' \
'::output -- Sets the output file to read from:_files' \
&& ret=0
;;
(extract)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
':input -- Sets the input file to read from:_files' \
':size -- Sets the size of icon you want to extract:(16 22 32 48 64)' \
':output -- Sets the output file to write to:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_ikona-cli_commands] )) ||
_ikona-cli_commands() {
    local commands; commands=(
        "optimize:Optimize your icon" \
"class:Class your icon" \
"convert:Convert your icon from light <-> dark" \
"extract:Extract icons from an Ikona template file" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'ikona-cli commands' commands "$@"
}
(( $+functions[_ikona-cli__class_commands] )) ||
_ikona-cli__class_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'ikona-cli class commands' commands "$@"
}
(( $+functions[_ikona-cli__convert_commands] )) ||
_ikona-cli__convert_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'ikona-cli convert commands' commands "$@"
}
(( $+functions[_ikona-cli__extract_commands] )) ||
_ikona-cli__extract_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'ikona-cli extract commands' commands "$@"
}
(( $+functions[_ikona-cli__help_commands] )) ||
_ikona-cli__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'ikona-cli help commands' commands "$@"
}
(( $+functions[_ikona-cli__optimize_commands] )) ||
_ikona-cli__optimize_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'ikona-cli optimize commands' commands "$@"
}

_ikona-cli "$@"