import p from "./index-classCallCheck.js";
import G from "./index-createClass.js";
import o from "./index-assertThisInitialized.js";
import f from "./index-inherits.js";
import c from "./index-createSuper.js";
import n from "./index-defineProperty.js";
import { Parser as l } from "./index-Parser4.js";
var T = /* @__PURE__ */ (function(u) {
  f(i, u);
  var s = c(i);
  function i() {
    var a;
    p(this, i);
    for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
      t[r] = arguments[r];
    return a = s.call.apply(s, [this].concat(t)), n(o(a), "priority", 140), n(o(a), "incompatibleTokens", ["R", "u", "t", "T"]), a;
  }
  return G(i, [{
    key: "parse",
    value: function(e, t, r) {
      switch (t) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return r.era(e, {
            width: "abbreviated"
          }) || r.era(e, {
            width: "narrow"
          });
        // A, B
        case "GGGGG":
          return r.era(e, {
            width: "narrow"
          });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return r.era(e, {
            width: "wide"
          }) || r.era(e, {
            width: "abbreviated"
          }) || r.era(e, {
            width: "narrow"
          });
      }
    }
  }, {
    key: "set",
    value: function(e, t, r) {
      return t.era = r, e.setUTCFullYear(r, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
    }
  }]), i;
})(l);
export {
  T as EraParser
};
