package mock

import (
	"github.com/stretchr/testify/mock"
	"htwkalender/data-manager/model"
)

// MockCourseService is a mock implementation of the CourseService interface
type MockCourseService struct {
	mock.Mock
}

func (m *MockCourseService) FindCourseByCourseName(courseName string) (model.SeminarGroup, error) {
	args := m.Called(courseName)
	return args.Get(0).(model.SeminarGroup), args.Error(1)
}

func (m *MockCourseService) GetAllCourses() []string {
	args := m.Called()
	return args.Get(0).([]string)
}

func (m *MockCourseService) GetAllCoursesForSemester(semester string) []model.SeminarGroup {
	args := m.Called(semester)
	return args.Get(0).([]model.SeminarGroup)
}

func (m *MockCourseService) GetAllCoursesForSemesterWithEvents(semester string) ([]string, error) {
	args := m.Called(semester)
	return args.Get(0).([]string), args.Error(1)
}

// MockEventService is a mock implementation of the EventService interface
type MockEventService struct {
	mock.Mock
}

func (m *MockEventService) GetModulesForCourseDistinct(course string, semester string) (model.Events, error) {
	args := m.Called(course, semester)
	return args.Get(0).(model.Events), args.Error(1)
}

func (m *MockEventService) GetAllModulesDistinct() ([]model.ModuleDTO, error) {
	args := m.Called()
	return args.Get(0).([]model.ModuleDTO), args.Error(1)
}

func (m *MockEventService) GetModuleByUUID(uuid string) (model.Module, error) {
	args := m.Called(uuid)
	return args.Get(0).(model.Module), args.Error(1)
}

func (m *MockEventService) DeleteAllEventsByCourseAndSemester(course string, semester string) error {
	args := m.Called(course, semester)
	return args.Error(0)
}

func (m *MockEventService) DeleteAllEvents() error {
	args := m.Called()
	return args.Error(0)
}

func (m *MockEventService) UpdateModulesForCourse(seminarGroup model.SeminarGroup) (model.Events, error) {
	args := m.Called(seminarGroup)
	return args.Get(0).(model.Events), args.Error(1)
}

func (m *MockEventService) GetEventTypes() ([]string, error) {
	args := m.Called()
	return args.Get(0).([]string), args.Error(1)
}
