from typing import Callable
import click


def df_filter_options(function: Callable, second_df: bool = False) -> Callable:
    """Combine multiple CLI filter options in one annotation.

    The use of second_df enables the use of a second set of the same filters.

    Args:
        function: Function which we extend.
        second_df: If True, add "2" to the name of options.

    Returns:
        Expanded function for the annotation.
    """
    if second_df:
        sec = "2"
    else:
        sec = ""
    function = click.option("--venues" + sec)(function)
    function = click.option("--year" + sec, type=int)(function)
    function = click.option("--min-year" + sec, type=int)(function)
    function = click.option("--max-year" + sec, type=int)(function)
    function = click.option("--author" + sec)(function)
    function = click.option("--fauthor" + sec)(function)
    function = click.option("--data" + sec)(function)
    return function