"use strict";

/**
 * TOTP Enrollment Methods Mixin
 */

export function OxyServicesTotpMixin(Base) {
  return class extends Base {
    constructor(...args) {
      super(...args);
    }
    async startTotpEnrollment(sessionId) {
      try {
        return await this.makeRequest('POST', '/api/auth/totp/enroll/start', {
          sessionId
        }, {
          cache: false
        });
      } catch (error) {
        throw this.handleError(error);
      }
    }
    async verifyTotpEnrollment(sessionId, code) {
      try {
        return await this.makeRequest('POST', '/api/auth/totp/enroll/verify', {
          sessionId,
          code
        }, {
          cache: false
        });
      } catch (error) {
        throw this.handleError(error);
      }
    }
    async disableTotp(sessionId, code) {
      try {
        return await this.makeRequest('POST', '/api/auth/totp/disable', {
          sessionId,
          code
        }, {
          cache: false
        });
      } catch (error) {
        throw this.handleError(error);
      }
    }
  };
}
//# sourceMappingURL=OxyServices.totp.js.map