import click
import functools


def common_entitlements_options(f):
    """Add common options for entitlement commands."""

    @click.option(
        "--show-tokens",
        default=False,
        is_flag=True,
        help="Show entitlement token string contents in output.",
    )
    @click.pass_context
    @functools.wraps(f)
    def wrapper(ctx, *args, **kwargs):
        # pylint: disable=missing-docstring
        return ctx.invoke(f, *args, **kwargs)

    return wrapper