<commit_before>'use strict'

var Element = require('../../lib')
var Observable = require('vigour-js/lib/observable')
require('./todo.less')

var app = new Element({
  DOM: document.body
})

var Todo = new Element({
  type: 'li',
  view: {
    toggle: {
      type: 'input',
      attributes: {
        type: 'checkbox'
      }
    },
    title: {
      type: 'label',
      text: { $: 'title' }
    },
    destroy: {
      type: 'button',
      on: {
        click () {
          console.log('ok remove!')
          app.patch()
        }
      }
    }
  },
  edit: {
    type: 'input'
  }
}).Constructor

var todos = new Observable({
  todo: {
    title: 'some todo from datax'
  }
})

app.set({
  todoapp: {
    header: {
      type: 'header',
      title: {
        type: 'h1',
        text: 'todo-app'
      },
      ['new-todo']: {
        type: 'input',
        attributes: {
          placeholder: 'What needs to be done?'
        },
        on: {
          keyup () {
            console.log('lullllz')
          }
        }
      },
      main: {
        type: 'section',
        ['toggle-all']: {
          type: 'input',
          attributes: {
            type: 'checkbox',
            checked: true
          }
        },
        ['todo-list']: {
          type: 'ul',
          css: 'main',
          $collection: true,
          Child: Todo,
          val: todos
        }
      }
    }
  }
})<commit_msg>removed unnsecary css<commit_after>'use strict'

var Element = require('../../lib')
var Observable = require('vigour-js/lib/observable')
require('./todo.less')

// ----- data ----
var todos = new Observable({
  todo: {
    title: 'some todo from datax'
  }
})

// ----- ui -----
var app = new Element({
  DOM: document.body
})

var Todo = new Element({
  type: 'li',
  view: {
    toggle: {
      type: 'input',
      attributes: {
        type: 'checkbox'
      }
    },
    title: {
      type: 'label',
      text: { $: 'title' }
    },
    destroy: {
      type: 'button',
      on: {
        down () {
          console.log('ok remove!')
          app.patch()
        }
      }
    }
  },
  edit: {
    type: 'input'
  }
}).Constructor

app.set({
  todoapp: {
    header: {
      type: 'header',
      title: {
        type: 'h1',
        text: 'todo-app'
      },
      ['new-todo']: {
        type: 'input',
        attributes: {
          placeholder: 'What needs to be done?'
        },
        on: {
          keyup () {
            console.log('lullllz')
          }
        }
      },
      main: {
        type: 'section',
        ['toggle-all']: {
          type: 'input',
          attributes: {
            type: 'checkbox',
            checked: true
          }
        },
        ['todo-list']: {
          type: 'ul',
          $collection: true,
          Child: Todo,
          val: todos
        }
      }
    }
  }
})
{'fraction_non_alphanumeric': 0.1682406435816719, 'fraction_numerical': 0.0006995452955578874, 'mean_word_length': 1.2843450479233227, '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': '2452971', 'n_tokens_mistral': 936, 'n_tokens_neox': 939, 'n_words': 202}