// Generated by ReScript, PLEASE EDIT WITH CARE

import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.mjs";

function decodeGroup(group) {
  let id = group.id;
  if (typeof id !== "string") {
    return [
      "e",
      "f"
    ];
  }
  let name = group.name;
  if (typeof name === "string") {
    return [
      id,
      name
    ];
  } else {
    return [
      "e",
      "f"
    ];
  }
}

function decodeNull(x) {
  let match = x.field;
  if (match === undefined) {
    return "no";
  }
  let tmp = Primitive_option.valFromOption(match);
  if (tmp === null) {
    return "yes it's null";
  } else {
    return "no";
  }
}

function decodeUndefined(x) {
  let match = x.field;
  if (match === undefined) {
    return "no";
  }
  let tmp = Primitive_option.valFromOption(match);
  if (tmp === undefined) {
    return "yes it's undefined";
  } else {
    return "no";
  }
}

export {
  decodeGroup,
  decodeNull,
  decodeUndefined,
}
/* No side effect */
