package matchmaker

import (
	"context"
	"log/slog"

	"github.com/costap/quarkshologridledger/tongo-core/internal/domain/entity"
	"github.com/costap/quarkshologridledger/tongo-core/internal/domain/port"
)

// Matchmaker pairs factions and selects venues to create new matches.
type Matchmaker struct {
	quadrants []entity.Quadrant
	venues    []entity.Venue
	templates []entity.MarketTemplate
	markets   port.MarketService
	logger    *slog.Logger
}

// New creates a new Matchmaker instance.
func New(
	quadrants []entity.Quadrant,
	venues []entity.Venue,
	templates []entity.MarketTemplate,
	markets port.MarketService,
	logger *slog.Logger,
) *Matchmaker {
	return &Matchmaker{
		quadrants: quadrants,
		venues:    venues,
		templates: templates,
		markets:   markets,
		logger:    logger,
	}
}

// CreateMatch generates a new match by selecting factions and a venue.
func (m *Matchmaker) CreateMatch(ctx context.Context) (*entity.Match, error) {
	m.logger.Debug("Creating new match")
	return &entity.Match{}, nil
}
