(item => item.id !== payload.id);
  });

  cami.debug.enable();

  // Define a middleware function
  const loggerMiddleware = (context) => {
    console.log(`Action ${context.action} was dispatched with payload:`, context.payload);
  };

  // Use the middleware function with the initialState
  CartStore.use(loggerMiddleware);

  class ProductListElement extends ReactiveElement {
    cartItems = [];
    products = [];

    onConnect() {
      CartStore.subscribe(state => {
        this.cartItems = state.cart