#compdef gpg-tui

autoload -U is-at-least

_gpg-tui() {
    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[@]}" \
'--config=[Sets the configuration file]:path: ' \
'--homedir=[Sets the GnuPG home directory]:dir: ' \
'-o+[Sets the output directory]:dir: ' \
'--outdir=[Sets the output directory]:dir: ' \
'--outfile=[Sets the template for the output file name]:path: ' \
'-d+[Sets the default key to sign with]:key: ' \
'--default-key=[Sets the default key to sign with]:key: ' \
'-t+[Sets the tick rate of the terminal]:ms: ' \
'--tick-rate=[Sets the tick rate of the terminal]:ms: ' \
'-c+[Sets the accent color of the terminal]:color: ' \
'--color=[Sets the accent color of the terminal]:color: ' \
'-s+[Sets the style of the terminal]:style:(plain colored)' \
'--style=[Sets the style of the terminal]:style:(plain colored)' \
'-f+[Sets the utility for file selection]:app: ' \
'--file-explorer=[Sets the utility for file selection]:app: ' \
'--detail-level=[Sets the detail level for the keys]:level:((minimum\:"Show only the primary key and user ID"
standard\:"Show all subkeys and user IDs"
full\:"Show signatures"))' \
'--select=[Enables the selection mode]:option:(key_id key_fpr user_id row1 row2)' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'-a[Enables ASCII armored output]' \
'--armor[Enables ASCII armored output]' \
'--splash[Shows the splash screen on startup]' \
&& ret=0
}

(( $+functions[_gpg-tui_commands] )) ||
_gpg-tui_commands() {
    local commands; commands=()
    _describe -t commands 'gpg-tui commands' commands "$@"
}

_gpg-tui "$@"
