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

    @handleEvents()

  handleEvents: =>
    @querySelector('.btn').addEventListener 'click', @stage
    @addEventListener 'dblclick', @stage

  detatchedCallback: ->
    @querySelector('.btn').removeEventListener 'click', @stage
    @removeEventListener 'dblclick', @stage

  setFile: (model) ->
    @model = model if model
    @setPath()
    @setIcon()

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


