import { SdkCache as i, CodeGenUtil as o, Validate as r } from "@accelbyte/sdk";
import { Config as m } from "./accelbyte-widgets592.mjs";
import { Configs as h } from "./accelbyte-widgets595.mjs";
class u {
  constructor(t, s, e = !1) {
    this.axiosInstance = t, this.namespace = s, this.cache = e;
  }
  getConfigs_ByTemplate(t) {
    const s = {}, e = "/odin-config/v1/public/namespaces/{namespace}/templates/{template}/configs".replace("{namespace}", this.namespace).replace("{template}", t), a = this.axiosInstance.get(e, { params: s }), c = () => r.responseType(() => a, h, "Configs");
    if (!this.cache)
      return i.withoutCache(c);
    const n = e + o.hashCode(JSON.stringify({ params: s }));
    return i.withCache(n, c);
  }
  getConfig_ByTemplate_ByConfig(t, s) {
    const e = {}, a = "/odin-config/v1/public/namespaces/{namespace}/templates/{template}/configs/{config}".replace("{namespace}", this.namespace).replace("{template}", t).replace("{config}", s), c = this.axiosInstance.get(a, { params: e }), n = () => r.responseType(() => c, m, "Config");
    if (!this.cache)
      return i.withoutCache(n);
    const p = a + o.hashCode(JSON.stringify({ params: e }));
    return i.withCache(p, n);
  }
}
export {
  u as Templates$
};
