# otp_workflow_screen.py

from typing import List, Optional

from textual.app import ComposeResult
from textual.screen import Screen

from models.agent import Agent
from TUI.OTP_generate import OTPGenerator


class OTPWorkflowScreen(Screen):
    """Screen that handles the OTP generation workflow without agent selection."""

    def __init__(self, selected_agents: Optional[List[Agent]]):
        super().__init__()
        self.selected_agents = selected_agents

    def compose(self) -> ComposeResult:
        """Directly show the OTP generator for the selected agents."""
        yield OTPGenerator(self.selected_agents)

    def on_otp_generator_otp_info(self, message: OTPGenerator.OTPInfo) -> None:
        """Handle OTP generation request - pass it up to the app level if needed."""
