*** Settings ***
Library    Process
Library    String

*** Test Cases ***
TUI Widgets Actor Selection Overlay Initialization
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.actor_selection_overlay import ActorSelectionOverlay
    ...    assert callable(ActorSelectionOverlay), "ActorSelectionOverlay should be a callable class"
    ...    print("actor-selection-overlay-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    actor-selection-overlay-ok

TUI Widgets Persona Bar Rendering
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.persona_bar import PersonaBar
    ...    assert callable(PersonaBar), "PersonaBar should be a callable class"
    ...    print("persona-bar-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    persona-bar-ok

TUI Widgets Prompt Input Submission
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.prompt import PromptInput
    ...    assert callable(PromptInput), "PromptInput should be a callable class"
    ...    print("prompt-input-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    prompt-input-ok

TUI Widgets Reference Picker Initialization
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.reference_picker import ReferencePickerOverlay
    ...    assert callable(ReferencePickerOverlay), "ReferencePickerOverlay should be a callable class"
    ...    print("reference-picker-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    reference-picker-ok

TUI Widgets Slash Command Overlay Initialization
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.slash_command_overlay import SlashCommandOverlay
    ...    assert callable(SlashCommandOverlay), "SlashCommandOverlay should be a callable class"
    ...    print("slash-command-overlay-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    slash-command-overlay-ok

TUI Widgets Thought Block Rendering
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.thought_block import ThoughtBlockWidget
    ...    assert callable(ThoughtBlockWidget), "ThoughtBlockWidget should be a callable class"
    ...    print("thought-block-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    thought-block-ok

TUI Widgets Throbber Animation
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.throbber import LoadingThrobber
    ...    assert callable(LoadingThrobber), "LoadingThrobber should be a callable class"
    ...    print("throbber-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    throbber-ok

TUI Widgets Permission Question Widget
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.permission_question import PermissionQuestionWidget
    ...    assert callable(PermissionQuestionWidget), "PermissionQuestionWidget should be a callable class"
    ...    print("permission-question-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    permission-question-ok

TUI Widgets Help Panel Overlay
    [Tags]    tdd_issue    tdd_issue_1928
    ${script}=    Catenate    SEPARATOR=\n
    ...    from cleveragents.tui.widgets.help_panel_overlay import HelpPanelOverlay
    ...    assert callable(HelpPanelOverlay), "HelpPanelOverlay should be a callable class"
    ...    print("help-panel-overlay-ok")
    ${result}=    Run Process    ${PYTHON}    -c    ${script}    shell=False
    Should Be Equal As Integers    ${result.rc}    0
    Should Contain    ${result.stdout}    help-panel-overlay-ok
