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