package course_management

import (
	"Yimaru-Backend/internal/domain"
	"context"
)

func (s *Service) CreateCourseCategory(
	ctx context.Context,
	name string,
) (domain.CourseCategory, error) {
	return s.courseStore.CreateCourseCategory(ctx, name)
}

func (s *Service) GetCourseCategoryByID(
	ctx context.Context,
	id int64,
) (domain.CourseCategory, error) {
	return s.courseStore.GetCourseCategoryByID(ctx, id)
}

func (s *Service) GetAllCourseCategories(
	ctx context.Context,
	limit int32,
	offset int32,
) ([]domain.CourseCategory, int64, error) {
	return s.courseStore.GetAllCourseCategories(ctx, limit, offset)
}

func (s *Service) UpdateCourseCategory(
	ctx context.Context,
	id int64,
	name *string,
	isActive *bool,
) error {
	return s.courseStore.UpdateCourseCategory(ctx, id, name, isActive)
}

func (s *Service) DeleteCourseCategory(
	ctx context.Context,
	id int64,
) error {
	return s.courseStore.DeleteCourseCategory(ctx, id)
}
