<commit_before>import AddTodoView from "./AddTodoView"
import ClearCompletedView from "./ClearCompletedView"
import ClearCompletedViewModel from "./ClearCompletedViewModel"
import FiltersView from "./FiltersView"
import RootModel from "../model/RootModel"
import SummarizationView from "./SummarizationView"
import TodosView from "./TodosView"
import ToggleAllView from "./ToggleAllView"
import ToggleAllViewModel from "./ToggleAllViewModel"
import TypedLayoutView from "./typedViews/TypedLayoutView"
import TypedLayoutViewOptions from "./typedViews/TypedLayoutViewOptions"

interface RootViewOptions extends TypedLayoutViewOptions<RootModel> { }

// TODO: Add the possibility to delete completed todos.

export default class RootView extends TypedLayoutView<RootModel> {
  constructor(options: RootViewOptions) {
    super(RootView.setDefaultOptions(options))
  }

  template = require("./RootView.ejs")

  onRender() {
    this.getRegion("addTodo").show(new AddTodoView({
      collection: this.model.todos
    }))

    this.getRegion("clearCompleted").show(new ClearCompletedView({
      model: new ClearCompletedViewModel({
        todos: this.model.todos
      })
    }))

    this.getRegion("filterTodos").show(new FiltersView({
      activeFilter: this.model.activeFilter
    }))
<commit_msg>Removed completed TODO<commit_after>import AddTodoView from "./AddTodoView"
import ClearCompletedView from "./ClearCompletedView"
import ClearCompletedViewModel from "./ClearCompletedViewModel"
import FiltersView from "./FiltersView"
import RootModel from "../model/RootModel"
import SummarizationView from "./SummarizationView"
import TodosView from "./TodosView"
import ToggleAllView from "./ToggleAllView"
import ToggleAllViewModel from "./ToggleAllViewModel"
import TypedLayoutView from "./typedViews/TypedLayoutView"
import TypedLayoutViewOptions from "./typedViews/TypedLayoutViewOptions"

interface RootViewOptions extends TypedLayoutViewOptions<RootModel> { }

export default class RootView extends TypedLayoutView<RootModel> {
  constructor(options: RootViewOptions) {
    super(RootView.setDefaultOptions(options))
  }

  template = require("./RootView.ejs")

  onRender() {
    this.getRegion("addTodo").show(new AddTodoView({
      collection: this.model.todos
    }))

    this.getRegion("clearCompleted").show(new ClearCompletedView({
      model: new ClearCompletedViewModel({
        todos: this.model.todos
      })
    }))

    this.getRegion("filterTodos").show(new FiltersView({
      activeFilter: this.model.activeFilter
    }))

{'fraction_non_alphanumeric': 0.1027450980392157, 'fraction_numerical': 0.0, 'mean_word_length': 5.0738095238095235, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4255852', 'n_tokens_mistral': 715, 'n_tokens_neox': 700, 'n_words': 160}