import click


def output_dir_option(required: bool):
    """
    Add click option of output directory.

    :param required: is this option required
    :type required: bool
    :return: click option
    """
    return click.option(
        "-o",
        "--output-dir",
        type=click.Path(dir_okay=True, file_okay=False),
        required=required,
        help="Output directory to save in.",
    )