text: 'use strict';
  var $ = require('jquery');
  
  var BootstrapRenderer = {
      render: function ($container, header, data) {
          this.populate(data);
          this.showFilter(this.$dom, $container, header, data);
  
          var defaultOptions = {
              buttonText: function (options) {
                  var nbSelected = $(options).filter(':selected').length;
                  if (nbSelected == 0) {
                      return header;
                  }
                  return header + ' (' + nbSelected + ')';
              }
          };
  
          this.$dom.multiselect($.extend(defaultOptions, this.rendererOptions));
  
          return this;
      },
  
      showFilter: function ($dom, $container) {
          $container.append(this.$dom);
      },
  
      refresh: function (data) {
          this.update(data);
          this.$dom.multiselect('rebuild');
  
          return this;
      }
  };
  
  module.exports = BootstrapRenderer;