#[cfg(not(feature = "std"))]
use alloc::string::String;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(js_namespace = localStorage, js_name = getItem)]
pub fn ls_get_item(key: &str) -> Option<String>;
#[wasm_bindgen(js_namespace = localStorage, js_name = setItem)]
pub fn ls_set_item(key: &str, value: &str);
#[wasm_bindgen(js_namespace = localStorage, js_name = removeItem)]
pub fn ls_remove_item(key: &str);
#[wasm_bindgen(js_name = "Date.now")]
pub fn date_now() -> f64;
#[wasm_bindgen(js_namespace = console)]
pub fn log(s: &str);
}
pub fn current_timestamp() -> u64 {
(date_now() / 1000.0) as u64
}
#[derive(Debug, Clone)]
pub enum WebStorageBackend {
LocalStorage,
}