#compdef artem

autoload -U is-at-least

_artem() {
    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[@]}" \
'-c+[Change the characters that are used to display the image.The first character should have the highest '\''density'\'' and the last should have the least (probably a space).A lower detail map is recommend for smaller images.]: :( )' \
'--characters=[Change the characters that are used to display the image.The first character should have the highest '\''density'\'' and the last should have the least (probably a space).A lower detail map is recommend for smaller images.]: :( )' \
'(-h --height -w --width)-s+[Change the size of the output image.The minimum size is 20, the maximum 230. Values outside of the range will beignored and changed to the nearest usable value. This argument is conflicting with --width and --height]: :( )' \
'(-h --height -w --width)--size=[Change the size of the output image.The minimum size is 20, the maximum 230. Values outside of the range will beignored and changed to the nearest usable value. This argument is conflicting with --width and --height]: :( )' \
'--ratio=[Change the ratio between height and width, since Ascii chars are a bit higher than long.The default value is 0.43, min is 0 and max 2. It is not recommend to change this setting.]: :( )' \
'-o+[Output file for non-colored ascii. If the output file is a plaintext file, no color will be used. The use color, either use a file with an .ansi extension, or an .html file, to convert the output to html.]: :_files' \
'--output=[Output file for non-colored ascii. If the output file is a plaintext file, no color will be used. The use color, either use a file with an .ansi extension, or an .html file, to convert the output to html.]: :_files' \
'--thread=[OutputNumber of threads used to convert the image. A larger number can lead to grater performance. Defaults to 4]: :( )' \
'--verbose=[Choose the verbosity of the logging level.]: :(trace debug info warn error)' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'(-w --width)-h[Use the terminal maximum terminal height to display the image.This argument is conflicting with --size and --width ]' \
'(-w --width)--height[Use the terminal maximum terminal height to display the image.This argument is conflicting with --size and --width ]' \
'-w[Use the terminal maximum terminal height to display the image.This argument is conflicting with --size and --height ]' \
'--width[Use the terminal maximum terminal height to display the image.This argument is conflicting with --size and --height ]' \
'--flipX[Flip the image along the X axis]' \
'--flipY[Flip the image along the Y axis]' \
'--invert[Inverts the characters used for the image, so light characters will as dark ones. Can be useful if the image has a dark background.]' \
'(--no-color)--background[Sets the background of the ascii as the color. This will be ignored if the terminal does not support truecolor. This argument is mutually exclusive with the no-color argument.]' \
'--border[Adds a decorative border surrounding the ascii image. This will make the image overall a bit smaller, since it respects the user given size.]' \
'--no-color[Do not use color when printing the image to the terminal.]' \
':INPUT -- Path to the target image. Does NOT alter the original image:_files' \
&& ret=0
}

(( $+functions[_artem_commands] )) ||
_artem_commands() {
    local commands; commands=()
    _describe -t commands 'artem commands' commands "$@"
}

_artem "$@"
