import { generatePath as o } from "react-router";
import { matchPath as i } from "react-router-dom";
class P {
  constructor(t) {
    this.link = t;
  }
  makePath(t, r) {
    const e = o(this.link, t), a = new URLSearchParams();
    for (const s in r)
      Object.prototype.hasOwnProperty.call(r, s) && a.append(s, String(r[s]));
    const n = a.toString();
    return `${e}${n ? `?${n}` : ""}`;
  }
  withSearchParams(t) {
    return this.makePath(void 0, t);
  }
  is(t, r = {}) {
    const { exact: e = !0, strict: a = !1 } = r;
    return i(t, {
      path: this.link,
      exact: e,
      strict: a
    });
  }
}
export {
  P as PageRoute
};
