/// Native stubs for the browser FFI: the web demo is JS-only, so on native the
/// UI hooks are no-ops and `main` simply returns.

///|
pub fn js_dom_init() -> Unit {
  ()
}

///|
pub fn js_set_on_cell(cb : (Int32, Int32) -> Unit) -> Unit {
  ignore(cb)
}

///|
pub fn js_set_on_new(cb : () -> Unit) -> Unit {
  ignore(cb)
}

///|
pub fn js_set_on_undo(cb : () -> Unit) -> Unit {
  ignore(cb)
}

///|
pub fn js_bind_buttons() -> Unit {
  ()
}

///|
pub fn js_render(
  cells : String,
  status : String,
  selected : Int32,
  targets : String,
  from : Int32,
  to : Int32,
  animate : Bool,
) -> Unit {
  ignore((cells, status, selected, targets, from, to, animate))
}

///|
pub fn js_engine_depth() -> Int32 {
  3
}

///|
pub fn js_defer(cb : () -> Unit, ms : Int32) -> Unit {
  ignore((cb, ms))
}

///|
pub fn js_set_captured(by_white : String, by_black : String) -> Unit {
  ignore((by_white, by_black))
}

///|
pub fn js_show_promotion(is_white : Bool, cb : (Int32) -> Unit) -> Unit {
  ignore((is_white, cb))
}

///|
pub fn js_hide_promotion() -> Unit {
  ()
}

///|
pub fn js_initial_fen() -> String {
  ""
}