"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.OxyServicesSecurityMixin = OxyServicesSecurityMixin;
/**
 * Security Methods Mixin
 */

function OxyServicesSecurityMixin(Base) {
  return class extends Base {
    constructor(...args) {
      super(...args);
    }

    /**
     * Get user's security activity with pagination
     * @param limit - Number of results (default: 50, max: 100)
     * @param offset - Pagination offset (default: 0)
     * @param eventType - Optional filter by event type
     * @returns Security activity response with pagination
     */
    async getSecurityActivity(limit, offset, eventType) {
      try {
        const params = {};
        if (limit !== undefined) params.limit = limit;
        if (offset !== undefined) params.offset = offset;
        if (eventType) params.eventType = eventType;
        const response = await this.makeRequest('GET', '/api/security/activity', params, {
          cache: false
        });
        return response;
      } catch (error) {
        throw this.handleError(error);
      }
    }

    /**
     * Get recent security activity (convenience method)
     * @param limit - Number of recent events to fetch (default: 10)
     * @returns Array of recent security activities
     */
    async getRecentSecurityActivity(limit = 10) {
      try {
        const response = await this.getSecurityActivity(limit, 0);
        return response.data || [];
      } catch (error) {
        throw this.handleError(error);
      }
    }
  };
}
//# sourceMappingURL=OxyServices.security.js.map