var c = Object.defineProperty;
var X = (t, r, e) => r in t ? c(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
var n = (t, r, e) => (X(t, typeof r != "symbol" ? r + "" : r, e), e);
import { constructFrom as a } from "../../../constructFrom.js";
import { getTimezoneOffsetInMilliseconds as p } from "../../../_lib/getTimezoneOffsetInMilliseconds.js";
import { timezonePatterns as s } from "../constants.js";
import { Parser as u } from "../Parser.js";
import { parseTimezonePattern as o } from "../utils.js";
class z extends u {
  constructor() {
    super(...arguments);
    n(this, "priority", 10);
    n(this, "incompatibleTokens", ["t", "T", "x"]);
  }
  parse(e, i) {
    switch (i) {
      case "X":
        return o(
          s.basicOptionalMinutes,
          e
        );
      case "XX":
        return o(s.basic, e);
      case "XXXX":
        return o(
          s.basicOptionalSeconds,
          e
        );
      case "XXXXX":
        return o(
          s.extendedOptionalSeconds,
          e
        );
      case "XXX":
      default:
        return o(s.extended, e);
    }
  }
  set(e, i, m) {
    return i.timestampIsSet ? e : a(
      e,
      e.getTime() - p(e) - m
    );
  }
}
export {
  z as ISOTimezoneWithZParser
};
