<commit_before>import { View } from '../../core';
import Const from '../../const';
import Button from '../components/button';
import { isFunction } from 'lodash';

const IS_PLANTING_CLASS = 'plantingjs-is-planting';
const SUBMIT_BUTTON_INIT_VALUES = {
  modifier: 'accept',
  label: 'zrobione!',
  visible: false,
};
const START_BUTTON_INIT_VALUES = {
  modifier: 'accept',
  label: 'zacznij wysadzać!',
  visible: false,
};
const SELECT_PANO_INIT_VALUES = {
  modifier: 'accept',
  label: 'wybierz',
  visible: false,
};
const MODAL_CLASS = 'plantingjs-modal';

export default View.extend({
  toolbox: null,
  map: null,
  className: 'plantingjs-container',
  template: require('./main.hbs'),
  events: {
    'click .plantingjs-startbtn': 'startPlanting',
  },
  $proxy: null,

  initialize() {
    this.render();
    this.$proxy = this.$el.children();
    this.submit = new Button(SUBMIT_BUTTON_INIT_VALUES);
    this.submit.on('click', this.onClickSubmit, this);
    this.session().objects().on('add remove', (model, collection) => {
      if (this.app.getState() != Const.State.VIEWER) {
        const showSubmitButton = collection.length > 0;
        this.submit.model.set('visible', showSubmitButton);<commit_msg>button zrobione! is not initialized when the page is refreshing update<commit_after>import { View } from '../../core';
import Const from '../../const';
import Button from '../components/button';
import { isFunction } from 'lodash';

const IS_PLANTING_CLASS = 'plantingjs-is-planting';
const SUBMIT_BUTTON_INIT_VALUES = {
  modifier: 'accept',
  label: 'zrobione!',
  visible: false,
};
const START_BUTTON_INIT_VALUES = {
  modifier: 'accept',
  label: 'zacznij wysadzać!',
  visible: false,
};
const SELECT_PANO_INIT_VALUES = {
  modifier: 'accept',
  label: 'wybierz',
  visible: false,
};
const MODAL_CLASS = 'plantingjs-modal';

export default View.extend({
  toolbox: null,
  map: null,
  className: 'plantingjs-container',
  template: require('./main.hbs'),
  events: {
    'click .plantingjs-startbtn': 'startPlanting',
  },
  $proxy: null,

  initialize() {
    this.render();
    this.$proxy = this.$el.children();
    this.submit = new Button(SUBMIT_BUTTON_INIT_VALUES);
    this.submit.on('click', this.onClickSubmit, this);
    this.session().objects().on('add remove', (model, collection) => {
      if (this.app.getState() !== Const.State.VIEWER) {
        const showSubmitButton = collection.length > 0;
        this.submit.model.set('visible', showSubmitButton);
{'fraction_non_alphanumeric': 0.1594551282051282, 'fraction_numerical': 0.0008012820512820513, 'mean_word_length': 4.085539714867617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5973564', 'n_tokens_mistral': 839, 'n_tokens_neox': 837, 'n_words': 183}