import Brackets , { class as Bracket } from "./Bracket" ; import Rounds , { class as Round } from "./Round" ; import CommonLevel from "./Common/CommonLevel" ; export default class Level extends CommonLevel { bracket : Bracket ; round : Round ; template : string ; custom ? : string ; number = 1 ; public static isGrandFinals ( level ) { return level . bracket === Brackets . grandFinals ; } public static isCustom ( level ) { return level . bracket === Brackets . custom ; } public static isMidRound ( level ) { return level . round === Rounds . midRound ; } public static shouldShowRound ( level ) { return ! this . isGrandFinals ( level ) && ! this . isCustom ( level ) ; } public static shouldShowNumber ( level ) { return ( this . isGrandFinals ( level ) || this . isMidRound ( level ) ) && ! this . isCustom ( level ) ; } }