import {
  ApiService
} from "./chunk-2TRRHRR7.js";
import {
  Injectable,
  inject,
  setClassMetadata,
  ɵɵdefineInjectable
} from "./chunk-WI7WFVZR.js";

// src/app/services/enrollment.service.ts
var EnrollmentService = class _EnrollmentService {
  api = inject(ApiService);
  enroll(courseId, userId) {
    return this.api.post(`/api/courses/${courseId}/enroll`, { userId, courseId });
  }
  getEnrollments(userId) {
    return this.api.get(`/api/users/${userId}/enrollments`);
  }
  getCourseProgress(courseId, userId) {
    return this.api.get(`/api/courses/${courseId}/progress`, { userId });
  }
  markTopicProgress(topicId, userId, completed) {
    return this.api.post(`/api/topics/${topicId}/progress`, { userId, topicId, completed });
  }
  markResourceProgress(resourceId, userId, completed) {
    return this.api.post(`/api/resources/${resourceId}/progress`, { userId, resourceId, completed });
  }
  static \u0275fac = function EnrollmentService_Factory(__ngFactoryType__) {
    return new (__ngFactoryType__ || _EnrollmentService)();
  };
  static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _EnrollmentService, factory: _EnrollmentService.\u0275fac, providedIn: "root" });
};
(() => {
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(EnrollmentService, [{
    type: Injectable,
    args: [{
      providedIn: "root"
    }]
  }], null, null);
})();

export {
  EnrollmentService
};
//# sourceMappingURL=chunk-AALWYTMW.js.map
