package course_management

import (
	"Yimaru-Backend/internal/config"
	"Yimaru-Backend/internal/ports"
	cloudconvertservice "Yimaru-Backend/internal/services/cloudconvert"
	notificationservice "Yimaru-Backend/internal/services/notification"
	vimeoservice "Yimaru-Backend/internal/services/vimeo"
)

type Service struct {
	userStore         ports.UserStore
	courseStore       ports.CourseStore
	notificationSvc   *notificationservice.Service
	vimeoSvc          *vimeoservice.Service
	cloudConvertSvc   *cloudconvertservice.Service
	config            *config.Config
}

func NewService(
	userStore ports.UserStore,
	courseStore ports.CourseStore,
	notificationSvc *notificationservice.Service,
	cfg *config.Config,
) *Service {
	return &Service{
		userStore:       userStore,
		courseStore:     courseStore,
		notificationSvc: notificationSvc,
		config:          cfg,
	}
}

func (s *Service) SetVimeoService(vimeoSvc *vimeoservice.Service) {
	s.vimeoSvc = vimeoSvc
}

func (s *Service) HasVimeoService() bool {
	return s.vimeoSvc != nil
}

func (s *Service) SetCloudConvertService(ccSvc *cloudconvertservice.Service) {
	s.cloudConvertSvc = ccSvc
}

func (s *Service) HasCloudConvertService() bool {
	return s.cloudConvertSvc != nil
}
