export class ResponseFormatter {
  static success(data: any, message?: string) {
    return {
      success: true,
      message: message || 'تم بنجاح - Success',
      data,
    };
  }

  static paginated(data: any[], total: number, page: number, pageSize: number) {
    return {
      success: true,
      data,
      pagination: {
        total,
        page,
        pageSize,
        totalPages: Math.ceil(total / pageSize),
      },
    };
  }

  static error(message: string, error?: string) {
    return {
      success: false,
      message,
      error,
    };
  }
}

