#!/usr/bin/env python3
from __future__ import annotations
import sys, os, json, time, uuid
from typing import Optional, Dict, Any, Callable
from dataclasses import dataclass
import requests
from requests import RequestException

# Rich imports
from rich import box, print as rprint
from rich.console import Console
from rich.panel import Panel
from rich.align import Align
from rich.prompt import Prompt, Confirm
from rich.table import Table
from rich.live import Live
from rich.text import Text
from rich.progress import Progress, SpinnerColumn, TextColumn
from rich.layout import Layout
from rich.columns import Columns

console = Console()
from rich.console import Console
from .api_client import APIClient
from .cli import QuizCLI

console = Console()

def main():
    api = APIClient()
    cli = QuizCLI(api)
    cli.display_banner()
    cli.run()

    # console.print("[cyan]Select an option:[/cyan]")
    # console.print("1. Register")
    # console.print("2. Login")
    # console.print("3. Recover Account")
    # choice = input("Enter choice: ")

    # if choice == "1":
    #     cli.register_flow()
    # elif choice == "2":
    #     cli.login_flow()
    # elif choice == "3":
    #     cli.password_recovery_flow()
    # else:
    #     console.print("[red]Invalid option.[/red]")

if __name__ == "__main__":
    main()
