import m from "./index-classCallCheck.js";
import d from "./index-createClass.js";
import n from "./index-assertThisInitialized.js";
import u from "./index-inherits.js";
import c from "./index-createSuper.js";
import s from "./index-defineProperty.js";
import { Parser as p } from "./index-Parser4.js";
import { dayPeriodEnumToHours as l } from "./index-utils12.js";
var _ = /* @__PURE__ */ (function(f) {
  u(e, f);
  var i = c(e);
  function e() {
    var a;
    m(this, e);
    for (var t = arguments.length, o = new Array(t), r = 0; r < t; r++)
      o[r] = arguments[r];
    return a = i.call.apply(i, [this].concat(o)), s(n(a), "priority", 80), s(n(a), "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]), a;
  }
  return d(e, [{
    key: "parse",
    value: function(t, o, r) {
      switch (o) {
        case "a":
        case "aa":
        case "aaa":
          return r.dayPeriod(t, {
            width: "abbreviated",
            context: "formatting"
          }) || r.dayPeriod(t, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaaa":
          return r.dayPeriod(t, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return r.dayPeriod(t, {
            width: "wide",
            context: "formatting"
          }) || r.dayPeriod(t, {
            width: "abbreviated",
            context: "formatting"
          }) || r.dayPeriod(t, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "set",
    value: function(t, o, r) {
      return t.setUTCHours(l(r), 0, 0, 0), t;
    }
  }]), e;
})(p);
export {
  _ as AMPMParser
};
