package work

import (
	"tercul/internal/app/analytics"
	"tercul/internal/app/authz"
	"tercul/internal/domain"
	"tercul/internal/domain/search"
)

// Service is the application service for the work aggregate.
type Service struct {
	Commands *WorkCommands
	Queries  *WorkQueries
}

// NewService creates a new work Service.
func NewService(repo domain.WorkRepository, authorRepo domain.AuthorRepository, userRepo domain.UserRepository, searchClient search.SearchClient, authzSvc *authz.Service, analyticsSvc analytics.Service) *Service {
	return &Service{
		Commands: NewWorkCommands(repo, authorRepo, userRepo, searchClient, authzSvc, analyticsSvc),
		Queries:  NewWorkQueries(repo),
	}
}
