import random
import string
import argparse
from faker import Faker

fake = Faker()


def generate_random_letters(length):
    """
    Generates a random sequence of letters (basic Latin characters) of the specified length.

    Args:
        length (int): The length of the sequence to generate.

    Returns:
        str: A randomly generated sequence of letters.
    """
    return ''.join(random.choices(string.ascii_letters, k=length))


def generate_random_numbers(length):
    """
    Generates a random sequence of numeric characters of the specified length.

    Args:
        length (int): The length of the sequence to generate.

    Returns:
        str: A randomly generated sequence of numeric characters.
    """
    return ''.join(random.choices(string.digits, k=length))


def generate_random_names(count):
    """
    Generates a specified number of random proper names (first name and last name) using Faker.

    Args:
        count (int): The number of names to generate.

    Returns:
        list of str: A list of randomly generated names.
    """
    return [fake.name() for _ in range(count)]


def main():
    parser = argparse.ArgumentParser(description="Generate random sequences of various types.")
    parser.add_argument("--letters", type=int, help="Generate a random sequence of letters with the specified length.")
    parser.add_argument("--numbers", type=int, help="Generate a random sequence of numbers with the specified length.")
    parser.add_argument("--names", type=int, help="Generate a specified number of random names.")

    args = parser.parse_args()

    if args.letters:
        print(f"Random Letters ({args.letters}): {generate_random_letters(args.letters)}")

    if args.numbers:
        print(f"Random Numbers ({args.numbers}): {generate_random_numbers(args.numbers)}")

    if args.names:
        print("Random Names:")
        for i, name in enumerate(generate_random_names(args.names), 1):
            print(f"  {i}. {name}")

    if not (args.letters or args.numbers or args.names):
        print("No sequences requested. Use --help for usage information.")


if __name__ == "__main__":
    main()
