import { APIClub, ClubMemberRole, ClubType } from "../_interfaces/interfaces"; /** * Represents a member of a club in the game. * @interface * @property {string} tag - The player's tag, formatted as "#2R20PL0UR". * @property {string} name - The player's in-game name. * @property {number} trophies - The number of trophies earned by the player. * @property {ClubMemberRole} role - The role of the player in the club. */ export interface Member { tag: string; name: string; trophies: number; role: ClubMemberRole; } /** * Represents a club in Brawl Stars. * @class */ export default class Club { /** * The club's tag. * @type {string} */ tag: string; /** * The club's name. * @type {string} */ name: string; /** * The club's description. * @type {string} */ description: string; /** * The club's type. * @type {ClubType} */ type: ClubType; /** * The club's current number of trophies. * @type {number} */ trophies: number; /** * The club's required number of trophies for membership. * @type {number} */ requiredTrophies: number; /** * The club's members. * @type {Member[]} */ members: Member[]; /** * The club's total number of members. * @type {number} */ count_members: number; /** * The club's status, either "full" or "not full". * @type {("full" | "not full")} */ status: "full" | "not full"; /** * Creates a new Club instance. * @param {APIClub} api The club data returned by the API. * @constructor */ constructor(api: APIClub); /** * Returns an array of all the member tags in the club. * @returns {string[]} */ getTags(): string[]; /** * Returns an array of all the member names in the club. * @returns {string[]} */ getNames(): string[]; /** * Returns an array of all the members in the club with a specific role. * @param {ClubMemberRole} role The role to filter by. * @returns {Member[]} */ getRoleMembers(role: ClubMemberRole): Member[]; }