<commit_before>/*global goog:false KeepMeContributing:false*/

/**
 * @fileoverview
 * Represents checkbox to enable / disable notifications
 * (changes whether the schedule executor runs or not)
 */

goog.provide('KeepMeContributing.NotificationStatusViewModel');

goog.require('KeepMeContributing.NotificationStatusStore');

goog.require('goog.ui.Component.EventType');
goog.require('goog.ui.Checkbox');
goog.require('goog.ui.Checkbox.State');
goog.require('goog.ui.CheckboxRenderer');
goog.require('goog.dom');

/**
 * @constructor
 * Represents a checkbox to enable / disable notifications.
 *
 * FIXME: Maybe delegating goog.ui.Checkbox is enough.
 * But I'm not sure how to do it...
 */
KeepMeContributing.NotificationStatusViewModel = class extends goog.ui.Checkbox {

  /**
   * @override
   * @param {KeepMeContributing.NotificationStatusStore} notificationStatusStore
   * @param {goog.ui.Checkbox.State=} checked
   * @param {goog.dom.DomHelper=} domHelper
   * @param {goog.ui.CheckboxRenderer=} renderer
   */
  constructor(notificationStatusStore, checked = undefined, domHelper = undefined, renderer = undefined){
    super(checked = undefined, domHelper = undefined, renderer = undefined);

    /**
     * While a SchedulesView emit UI changes via its SchedulesController,
     * a NotificationStatusViewModel calls its NotificationStatusStore's method directly.
     * Because the NotificationStatusStore is the only object that handles the changes
     * in a NotificationStatusViewModel, and it's sufficiently simple (at least so far).
     *
     * @type {KeepMeContributing.NotificationStatusStore}
     * @private
     */
    this.notificationStatusStore_ = notificationStatusStore;
    this.registerDisposable(this.notificationStatusStore_);
  }

  /**
   * @override
   */
  enterDocument(){
    super();

    this.setChecked(this.notificationStatusStore_.isEnabled());<commit_msg>Fix: unintended assignment of arguments<commit_after>/*global goog:false KeepMeContributing:false*/

/**
 * @fileoverview
 * Represents checkbox to enable / disable notifications
 * (changes whether the schedule executor runs or not)
 */

goog.provide('KeepMeContributing.NotificationStatusViewModel');

goog.require('KeepMeContributing.NotificationStatusStore');

goog.require('goog.ui.Component.EventType');
goog.require('goog.ui.Checkbox');
goog.require('goog.ui.Checkbox.State');
goog.require('goog.ui.CheckboxRenderer');
goog.require('goog.dom');

/**
 * @constructor
 * Represents a checkbox to enable / disable notifications.
 *
 * FIXME: Maybe delegating goog.ui.Checkbox is enough.
 * But I'm not sure how to do it...
 */
KeepMeContributing.NotificationStatusViewModel = class extends goog.ui.Checkbox {

  /**
   * @override
   * @param {KeepMeContributing.NotificationStatusStore} notificationStatusStore
   * @param {goog.ui.Checkbox.State=} checked
   * @param {goog.dom.DomHelper=} domHelper
   * @param {goog.ui.CheckboxRenderer=} renderer
   */
  constructor(notificationStatusStore, checked = undefined, domHelper = undefined, renderer = undefined){
    super(checked, domHelper, renderer);

    /**
     * While a SchedulesView emit UI changes via its SchedulesController,
     * a NotificationStatusViewModel calls its NotificationStatusStore's method directly.
     * Because the NotificationStatusStore is the only object that handles the changes
     * in a NotificationStatusViewModel, and it's sufficiently simple (at least so far).
     *
     * @type {KeepMeContributing.NotificationStatusStore}
     * @private
     */
    this.notificationStatusStore_ = notificationStatusStore;
    this.registerDisposable(this.notificationStatusStore_);
  }

  /**
   * @override
   */
  enterDocument(){
    super();

    this.setChecked(this.notificationStatusStore_.isEnabled());
{'fraction_non_alphanumeric': 0.10894736842105263, 'fraction_numerical': 0.0, 'mean_word_length': 4.516690856313498, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1560236', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1011, 'n_words': 250}