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=/cdn/shop/t/4/assets/recently-viewed-products.js.map?v=94729125001750262651776190237