use lazy_static::lazy_static;
use std::collections::HashMap;

#[derive(PartialEq,Eq,Clone,Copy)]
pub enum FieldType {
    Encoded,
    Numeric,
    NumericDec,
    NumericHex,
    NumericOct,
}

lazy_static! {
    pub static ref EVENT_IDS: HashMap<&'static[u8], u32> = {
        let els: &[(&str, u32)] = &[ /* @EVENT_CONST@ */ ];
        let mut hm = HashMap::with_capacity(els.len());
        for (name, value) in els {
            hm.insert(name.as_bytes(), *value);
        }
        hm
    };
    pub static ref EVENT_NAMES: HashMap<u32, &'static str> = {
        let els: &[(&str, u32)] = &[ /* @EVENT_CONST@ */ ];
        let mut hm = HashMap::with_capacity(els.len());
        for (name, value) in els {
            hm.insert(*value, *name);
        }
        hm
    };
    pub static ref FIELD_TYPES: HashMap<&'static[u8],FieldType> = {
        let els: &[(&str, FieldType)] = &[ /* @FIELD_TYPES@ */ ];
        let mut hm = HashMap::with_capacity(els.len());
        for (name, typ) in els {
            hm.insert(name.as_bytes(), *typ);
        }
        hm
    };
    pub static ref SYSCALL_NAMES: HashMap<&'static str, HashMap<u32, &'static str>> = {
        let mut hm = HashMap::new();
        /* @SYSCALL_BUILD@ */
        hm
    };
}            

pub mod msg_type {
    use crate::types::MessageType;
    /* @CONSTANTS@ */
}
