export class RecentlyViewed{static#STORAGE_KEY="viewedProducts";static#MAX_PRODUCTS=4;static addProduct(productId){let viewedProducts=this.getProducts();viewedProducts=viewedProducts.filter(id=>id!==productId),viewedProducts.unshift(productId),viewedProducts=viewedProducts.slice(0,this.#MAX_PRODUCTS),localStorage.setItem(this.#STORAGE_KEY,JSON.stringify(viewedProducts))}static clearProducts(){localStorage.removeItem(this.#STORAGE_KEY)}static getProducts(){return JSON.parse(localStorage.getItem(this.#STORAGE_KEY)||"[]")}}
//# sourceMappingURL=/s/files/1/0677/1399/0759/t/1/assets/recently-viewed-products.js.map?v=1783078800
