import { UrlUtils as o } from "./accelbyte-widgets90.mjs";
import e from "react";
import { Switch as m, Route as a, Redirect as i } from "react-router-dom";
import p from "./accelbyte-widgets91.mjs";
import s from "./accelbyte-widgets92.mjs";
class f extends e.Component {
  render() {
    return /* @__PURE__ */ e.createElement(m, null, /* @__PURE__ */ e.createElement(
      a,
      {
        exact: !0,
        path: this.props.match.path,
        render: (r) => {
          const t = Number(o.silentSearchParamsBuilder(r.location.search).get("page"));
          return !Number.isNaN(t) && t >= 1 ? /* @__PURE__ */ e.createElement(p, { page: t }) : /* @__PURE__ */ e.createElement(i, { to: `${this.props.match.path}?page=1` });
        }
      }
    ), /* @__PURE__ */ e.createElement(
      a,
      {
        path: `${this.props.match.path}/:orderNo`,
        render: (r) => /* @__PURE__ */ e.createElement(s, { orderNo: r.match.params.orderNo })
      }
    ));
  }
}
export {
  f as OrderHistoryWidget
};
