from typing import Optional

import typer
from typing_extensions import Annotated


force_flag = Annotated[
    bool,
    typer.Option(
        "--force",
        "-f",
        help="Overwrite target files even if they were created manually.",
    ),
]
no_file_header_flag = Annotated[
    bool,
    typer.Option(
        "--no-file-header",
        "-H",
        help="Do not add the 'generated by yamlex' comment header at the top of the file.",
    ),
]
verbose_flag = Annotated[
    bool,
    typer.Option(
        "--verbose",
        help="Enable verbose output.",
    ),
]
quiet_flag = Annotated[
    bool,
    typer.Option(
        "--quiet",
        help="Disable any informational output. Only errors.",
    ),
]
dry_run_flag = Annotated[
    bool,
    typer.Option(
        "--dry-run",
        help=(
            "Test run without any files being created. "
        ),
    ),
]
remove_comments_flag = Annotated[
    bool,
    typer.Option(
        "--remove-comments",
        help="Remove any YAML comments from the created files."
    ),
]
line_length_option = Annotated[
    Optional[int],
    typer.Option(
        "--line-length",
        help="Maximum line length in the generated extension.yaml.",
        show_default="not limited",
    ),
]