+{CompositeDisposable, Disposable} = require 'atom'
 GitChanges = require './git-changes'
 
 BaseTemplate = """

    e?.stopImmediatePropagation()

    promise = if @model.status == 'unstaged'
      @git.stagePath(@model.path)
    else
      @git.unstagePath(@model.path)

    promise.then =>
      atom.emit('did-update-git-repository')

class FileSummaryView extends HTMLElement
  initialize: (@model) ->
    @model.observe ['file', 'status'], @setFile.bind(@)
    @subscriptions = new CompositeDisposable
    @setFile()


