from argparse import Namespace
from typing import List

from . import cli_log_utils
from .cli_spec import CLIArg


def cancel_arguments(
    shell: bool = False,
    default_log_level: str = "warning",
) -> List[CLIArg]:
    if shell:
        args_list = cli_log_utils.log_arguments(default_log_level=default_log_level)
    else:
        args_list = []
    args_list += [
        CLIArg(
            "job_ids",
            [],
            help="Ewoks job IDs.",
            nargs="+",
        ),
    ]
    return args_list


def parse_cancel_arguments(cli_args: Namespace, shell: bool = False):
    if shell:
        cli_log_utils.parse_log_arguments(cli_args)
