from dash import (
    html, 
    Dash
)
from dash.dependencies import (
    Input, 
    Output, 
    State
)


def register_callbacks(app: Dash):
    @app.callback(
        Output("output-container", "children"),
        [Input("send-button", "n_clicks")],
        [State("input-text", "value")]
    )
    def generate_response(n_clicks, input_text):
        if n_clicks > 0:
            response = "You said: " + input_text
            return html.Div(response)
        else:
            return ""