package usecase

import (
	"context"
	"time"

	"github.com/gofrs/uuid/v5"

	"github.com/saveinmed/backend-go/internal/domain"
)

// GetSellerDashboard aggregates commercial KPIs for the given seller.
func (s *Service) GetSellerDashboard(ctx context.Context, sellerID uuid.UUID) (*domain.SellerDashboard, error) {
	return s.repo.SellerDashboard(ctx, sellerID)
}

// GetAdminDashboard exposes marketplace-wide metrics for the last 30 days.
func (s *Service) GetAdminDashboard(ctx context.Context) (*domain.AdminDashboard, error) {
	since := time.Now().AddDate(0, 0, -30)
	return s.repo.AdminDashboard(ctx, since)
}
