use amalthea::language::control_handler::ControlHandler;
use amalthea::wire::debug_reply::DebugReply;
use amalthea::wire::debug_request::DebugRequest;
use amalthea::wire::exception::Exception;
use amalthea::wire::interrupt_reply::InterruptReply;
use amalthea::wire::jupyter_message::Status;
use amalthea::wire::shutdown_reply::ShutdownReply;
use amalthea::wire::shutdown_request::ShutdownRequest;
pub struct Control {}

impl ControlHandler for Control {
    fn handle_shutdown_request(&self, msg: &ShutdownRequest) -> Result<ShutdownReply, Exception> {
        // NYI
        Ok(ShutdownReply {
            status: Status::Ok,
            restart: msg.restart,
        })
    }

    fn handle_interrupt_request(&self) -> Result<InterruptReply, Exception> {
        // NYI
        Ok(InterruptReply { status: Status::Ok })
    }

    fn handle_debug_request(&self, _msg: &DebugRequest) -> Result<DebugReply, Exception> {
        // NYI
        Ok(DebugReply {
            content: serde_json::json!({}),
        })
    }
}
