import { APIRankingClub } from "../_interfaces/interfaces"; /** * Represents a club in the game. * @interface * @property {string} tag - The tag of the club. * @property {string} name - The name of the club. * @property {number} trophies - The number of trophies earned by the club. * @property {number} rank - The rank of the club. * @property {number} memberCount - The number of members in the club. */ export interface RankingClub { tag: string; name: string; trophies: number; rank: number; memberCount: number; } /** * A class for storing and manipulating a list of ranked clubs. * @class ClubRanking */ export default class ClubRanking { /** * The list of ranked clubs. * @type {RankingClub[]} */ ranking: RankingClub[]; /** * Creates an instance of ClubRanking. * @param {APIRankingClub[]} api - The list of ranked clubs from the API. * @constructor */ constructor(api: APIRankingClub[]); /** * Returns the club at the specified rank. * @param {number} position - The rank of the club. * @returns {(null | RankingClub)} The club at the specified rank, or null if the rank is invalid. */ rank(position: number): null | RankingClub; /** * Returns an array of club tags in the ranking. * @returns {string[]} An array of club tags. */ getTags(): string[]; /** * Returns an array of club names in the ranking. * @returns {string[]} An array of club names. */ getNames(): string[]; /** * Returns an array of clubs in the ranking with fewer than 30 members. * @returns {RankingClub[]} An array of clubs with fewer than 30 members. */ notFull(): RankingClub[]; }