package server

import (
	"context"

	"route256/cart/internal/domain/entity"
	"route256/cart/internal/domain/model"
)

type CartService interface {
	AddItem(ctx context.Context, userID entity.UID, item *model.Item) error
	GetItemsByUserID(ctx context.Context, userID entity.UID) (*model.Cart, error)
	DeleteItem(ctx context.Context, userID entity.UID, sku entity.Sku) error
	DeleteItemsByUserID(ctx context.Context, userID entity.UID) error
	CheckoutUserCart(ctx context.Context, userID entity.UID) (int64, error)
}

type Server struct {
	cartService CartService
}

func NewServer(cartService CartService) *Server {
	return &Server{
		cartService: cartService,
	}
}
