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: chat.rs
    path of file: ./repos/mk48/engine/yew_frontend/src/overlay
    
    the code of the file until where you have to start completion: // SPDX-FileCopyrightText: 2021 Softbear, Inc.
// SPDX-License-Identifier: AGPL-3.0-or-later

use crate::component::context_menu::{ContextMenu, ContextMenuButton};
use crate::component::positioner::Position;
use crate::component::section::Section;
use crate::event::event_target;
use crate::frontend::{
    use_chat_request_callback, use_core_state, use_ctw, use_player_request_callback,
    use_set_context_menu_callback,
};
use crate::translation::{use_translation, Translation};
use crate::window::
    
fn help_hint_of(hints: &[(&'static str, Vec<&'static str>)], text: &str) -> Option<&'static str> {
    let text = text.to_ascii_lowercase();
    if text.find("/invite").is_some() {
        Some("Invitation links cannot currently be accepted by players that are already in game. They must send a join request instead.")
    } else {
        for (value, keys) in hints.iter() {
            let mut found = true;
            for &k in keys.iter() {
                debug_assert_eq!(k, k.to_lowercase());
                if !text.find(k).is_some() {
                    found = false;
                }
            }
            if found {
                return Some(value);
            }
        }

        None
    }
}