<commit_before>import React from 'react';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import CoreAlwaysBeCasting from 'Parser/Core/Modules/AlwaysBeCasting';
import SPELLS from 'common/SPELLS';
import Icon from 'common/Icon';

class AlwaysBeCasting extends CoreAlwaysBeCasting {
  static ABILITIES_ON_GCD = [
    // Moonkin:
    SPELLS.MOONFIRE.id,
    SPELLS.SUNFIRE_CAST.id,
    SPELLS.STARSURGE_MOONKIN.id,
    SPELLS.STARFALL_CAST.id,
    SPELLS.LUNAR_STRIKE.id,
    SPELLS.SOLAR_WRATH_MOONKIN.id,
    SPELLS.NEW_MOON.id,
    SPELLS.HALF_MOON.id,
    SPELLS.FULL_MOON.id,
    SPELLS.MOONKIN_FORM,

    // Talents
    SPELLS.DISPLACER_BEAST_TALENT.id,
    SPELLS.TYPHOON.id,
    SPELLS.MASS_ENTANGLEMENT_TALENT.id,
    SPELLS.FORCE_OF_NATURE_TALENT.id,
    SPELLS.WILD_CHARGE_TALENT.id,
  ];
  ///TODO Add Moonkin haste buffs
  
  suggestions(when) {
    const deadTimePercentage = this.totalTimeWasted / this.owner.fightDuration;
    
    when(this.deadTimePercentage).isGreaterThan(0.02)
      .addSuggestion((suggest, actual, recommended) => {
        return suggest(<span> Your downtime can be improved. Try to Always Be Casting (ABC)...</span>)
          .icon('spell_mage_altertime')
          .actual(`${formatPercentage(deadTimePercentage)}% downtime`)
          .recommended(`It's recommended that the downtime doesn't go over ${Math.round(formatPercentage(recommended))}%`)
          .regular(recommended + 0.03).major(recommended + 0.08);
      });
  }

  statistic() {
    const deadTimePercentage = this.totalTimeWasted / this.owner.fightDuration;
   
    return (
      <StatisticBox
        icon={<Icon icon="spell_mage_altertime" alt="Downtime" />}
        value={`${formatPercentage(deadTimePercentage)} %`}<commit_msg>Fix variables and texts in ABC module<commit_after>import React from 'react';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import CoreAlwaysBeCasting from 'Parser/Core/Modules/AlwaysBeCasting';
import SPELLS from 'common/SPELLS';
import Icon from 'common/Icon';

class AlwaysBeCasting extends CoreAlwaysBeCasting {
  static ABILITIES_ON_GCD = [
    // Moonkin:
    SPELLS.MOONFIRE.id,
    SPELLS.SUNFIRE_CAST.id,
    SPELLS.STARSURGE_MOONKIN.id,
    SPELLS.STARFALL_CAST.id,
    SPELLS.LUNAR_STRIKE.id,
    SPELLS.SOLAR_WRATH_MOONKIN.id,
    SPELLS.NEW_MOON.id,
    SPELLS.HALF_MOON.id,
    SPELLS.FULL_MOON.id,
    SPELLS.MOONKIN_FORM,

    // Talents
    SPELLS.DISPLACER_BEAST_TALENT.id,
    SPELLS.TYPHOON.id,
    SPELLS.MASS_ENTANGLEMENT_TALENT.id,
    SPELLS.FORCE_OF_NATURE_TALENT.id,
    SPELLS.WILD_CHARGE_TALENT.id,
  ];
  ///TODO Add Moonkin haste buffs
  
  suggestions(when) {
    const deadTimePercentage = this.totalTimeWasted / this.owner.fightDuration;
    
    when(deadTimePercentage).isGreaterThan(0.02)
      .addSuggestion((suggest, actual, recommended) => {
        return suggest(<span> Your downtime can be improved. Try to Always Be Casting (ABC)...</span>)
          .icon('spell_mage_altertime')
          .actual(`${formatPercentage(actual)}% downtime`)
          .recommended(`${Math.round(formatPercentage(recommended))}% is recommended`)
          .regular(recommended + 0.03).major(recommended + 0.08);
      });
  }

  statistic() {
    const deadTimePercentage = this.totalTimeWasted / this.owner.fightDuration;
   
    return (
      <StatisticBox
        icon={<Icon icon="spell_mage_altertime" alt="Downtime" />}
        value={`${formatPercentage(deadTimePercentage)} %`}
{'fraction_non_alphanumeric': 0.11550236571110492, 'fraction_numerical': 0.005009741163373225, 'mean_word_length': 3.643410852713178, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '529733', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1289, 'n_words': 202}