 _ = require 'underscore'
 Backbone = require 'backbone'
-template = require('./index.jade')
+template = -> require('./index.jade') arguments...
 
 module.exports = class ColorFilterView extends Backbone.View
   events:

    @params.set page: 1, silent: true
    @params.unset 'color'

  renderSelectedAndEmptyStates: =>
    # First remove all empty states
    _.each(@$clickableColors, (color) =>
      $(color).removeAttr('data-empty')

      @$checkmark.hide()

    # Add empty states
    respColors = _.pluck @aggregations.get('COLOR')?.get('counts'), 'name'
    emptyColors = _.difference(@colors, respColors)
    _.each(emptyColors, (color) ->
      @$("svg path[data-value='#{color}']").attr('data-empty', true)
