You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: progress_popup.rs
    path of file: ./repos/spyglass/crates/client/src/pages
    
    the code of the file until where you have to start completion: use serde_wasm_bindgen::from_value;
use shared::event::ModelStatusPayloadWrapper;
use wasm_bindgen::{prelude::Closure, JsValue};
use yew::{platform::spawn_local, prelude::*};

pub struct ProgressPopup {
    msg: Option<String>,
    percent: Option<String>,
}

pub enum Msg {
    UpdateStatus(String, String),
}

impl Component for ProgressPopup {
    type Message = Msg;
    type Properties = ();

    fn create(ctx: &Context<Self>) -> Self {
        let link = ctx.link();

        // Handle refreshing
        {
            let link = link.clone();
            spawn_local(async move {
                let cb = Closure::wrap(Box::new(move |pay
    
    fn create(ctx: &Context<Self>) -> Self {
        let link = ctx.link();

        // Handle refreshing
        {
            let link = link.clone();
            spawn_local(async move {
                let cb = Closure::wrap(Box::new(move |payload: JsValue| {
                    if let Ok(res) = from_value::<ModelStatusPayloadWrapper>(payload) {
                        link.send_message(Msg::UpdateStatus(res.payload.msg, res.payload.percent));
                    }
                }) as Box<dyn Fn(JsValue)>);

                let _ = crate::listen("progress_update", &cb).await;
                cb.forget();
            });
        }

        Self {
            msg: None,
            percent: None,
        }
    }