use js_sys::JsString;
use wasm_bindgen::prelude::*;
#[cfg(feature = "mmo")]
use crate::{enums::action_error_codes::game::shard::*, prelude::*};
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen(js_name = "shard")]
type Shard;
#[wasm_bindgen(js_namespace = ["Game"], js_class = "shard", static_method_of = Shard, getter, js_name = name)]
fn name() -> JsString;
#[wasm_bindgen(js_namespace = ["Game"], js_class = "shard", static_method_of = Shard, getter, js_name = type)]
fn shard_type() -> JsString;
#[wasm_bindgen(js_namespace = ["Game"], js_class = "shard", static_method_of = Shard, getter, js_name = ptr)]
fn ptr() -> bool;
#[cfg(feature = "mmo")]
#[wasm_bindgen(js_namespace = ["Game"], js_class = "shard", static_method_of = Shard, getter, js_name = access)]
fn access() -> bool;
#[cfg(feature = "mmo")]
#[wasm_bindgen(js_namespace = ["Game"], js_class = "shard", static_method_of = Shard, getter, js_name = accessTime)]
fn access_time() -> Option<f64>;
#[cfg(feature = "mmo")]
#[wasm_bindgen(js_namespace = ["Game"], js_class = "shard", static_method_of = Shard, js_name = activateAccess)]
fn activate_access() -> i8;
}
pub fn name() -> String {
Shard::name().into()
}
pub fn shard_type() -> String {
Shard::shard_type().into()
}
pub fn ptr() -> bool {
Shard::ptr()
}
#[cfg(feature = "mmo")]
pub fn access() -> bool {
Shard::access()
}
#[cfg(feature = "mmo")]
pub fn access_time() -> Option<f64> {
Shard::access_time()
}
#[cfg(feature = "mmo")]
pub fn activate_access() -> Result<(), ActivateAccessErrorCode> {
ActivateAccessErrorCode::result_from_i8(Shard::activate_access())
}