<commit_before>'use strict';

import './dash-layer-switcher-styles.postcss';
import React from 'react';
import $ from 'jquery';

import Legend from '../Legend';

class DashLayerSwitcher extends React.Component {

  constructor(props) {
    super(props);
    this.props = props;
    this.state = {};

    this.subLayers = [
      { id: 'amountOfMoney', literal: 'Amount of money' },
      { id: 'donorsNumber', literal: 'Number of donors' } 
    ]
  }

  componentDidMount() {
    this._toogleLegend();
  }

  componentDidUpdate() {
    this._toogleLegend();
  }

  _toogleLegend() {
    $('.legend-wrapper').animate({ 'height': 0 + 'px'}, 200 );
    let height = $('.legend-wrapper.is-open .m-legend').height();
    $('.legend-wrapper.is-open').animate({ 'height': height + 12 + 'px'}, 200 );
  }

  render() {
    let switchers = [];<commit_msg>comment TODO in layers switcher<commit_after>'use strict';

import './dash-layer-switcher-styles.postcss';
import React from 'react';
import $ from 'jquery';

import Legend from '../Legend';

class DashLayerSwitcher extends React.Component {

  constructor(props) {
    super(props);
    this.props = props;
    this.state = {};

    //TODO - take layers from layer config
    this.subLayers = [
      { id: 'amountOfMoney', literal: 'Amount of money' },
      { id: 'donorsNumber', literal: 'Number of donors' } 
    ]
  }

  componentDidMount() {
    this._toogleLegend();
  }

  componentDidUpdate() {
    this._toogleLegend();
  }

  _toogleLegend() {
    $('.legend-wrapper').animate({ 'height': 0 + 'px'}, 200 );
    let height = $('.legend-wrapper.is-open .m-legend').height();
    $('.legend-wrapper.is-open').animate({ 'height': height + 12 + 'px'}, 200 );
  }

  render() {
    let switchers = [];
{'fraction_non_alphanumeric': 0.17741015402167712, 'fraction_numerical': 0.01026811180832858, 'mean_word_length': 3.1465721040189125, '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': '3129122', 'n_tokens_mistral': 609, 'n_tokens_neox': 558, 'n_words': 130}