import o from "js-cookie";
import { C as s } from "./base-PQGakkrl.js";
class l {
  static getItem(t) {
    let e = o.get(t);
    return s.isString(e) && e.indexOf('\\"') > -1 && (e = e.replace(/\\"/gi, '"')), s.isJson(e) && (e = JSON.parse(e)), e;
  }
  static setItem(t, e) {
    let i;
    return !s.isEmpty(e) && s.isJson(e) && s.isObject(e) && (i = JSON.stringify(e)), o.set(t, i || e);
  }
  static removeItem(t) {
    o.remove(t);
  }
  static removeList(t) {
    s.isEmpty(t) || t.forEach((e) => {
      this.removeItem(e);
    });
  }
  static clearAll() {
    const t = document.cookie.split(";");
    for (let e = 0; e < t.length; e++) {
      const i = t[e], r = i.indexOf("="), m = r > -1 ? i.substring(0, r) : i;
      this.removeItem(m);
    }
  }
}
export {
  l as C
};
//# sourceMappingURL=Tools_cookie-DKctMXdK.js.map
