Object.defineProperty(exports, '__esModule', {
  value: true
});

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

var _templateObject = _taggedTemplateLiteral(['\n    import SelectListView from \'atom-select-list\'\n\n    const selectListView = new SelectListView({\n      items: [\'one\', \'two\', \'three\'],\n      elementForItem: (item) => {\n        const li = document.createElement(\'li\')\n        li.textContent = item\n        return li\n      },\n      didConfirmSelection: (item) => {\n        console.log(\'confirmed\', item)\n      },\n      didCancelSelection: () => {\n        console.log(\'cancelled\')\n      }\n    })\n    '], ['\n    import SelectListView from \'atom-select-list\'\n\n    const selectListView = new SelectListView({\n      items: [\'one\', \'two\', \'three\'],\n      elementForItem: (item) => {\n        const li = document.createElement(\'li\')\n        li.textContent = item\n        return li\n      },\n      didConfirmSelection: (item) => {\n        console.log(\'confirmed\', item)\n      },\n      didCancelSelection: () => {\n        console.log(\'cancelled\')\n      }\n    })\n    ']);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

/** @babel */
/** @jsx etch.dom */

var _atomSelectList = require('atom-select-list');

var _atomSelectList2 = _interopRequireDefault(_atomSelectList);

var _etch = require('etch');

var _etch2 = _interopRequireDefault(_etch);

var _dedent = require('dedent');

var _dedent2 = _interopRequireDefault(_dedent);

var _codeBlock = require('./code-block');

var _codeBlock2 = _interopRequireDefault(_codeBlock);

var ExampleSelectListView = (function () {
  function ExampleSelectListView() {
    _classCallCheck(this, ExampleSelectListView);

    this.jsExampleCode = (0, _dedent2['default'])(_templateObject);
    _etch2['default'].initialize(this);
  }

  _createClass(ExampleSelectListView, [{
    key: 'elementForItem',
    value: function elementForItem(item) {
      var li = document.createElement('li');
      li.textContent = item;
      return li;
    }
  }, {
    key: 'didConfirmSelection',
    value: function didConfirmSelection(item) {
      console.log('confirmed', item);
    }
  }, {
    key: 'didCancelSelection',
    value: function didCancelSelection() {
      console.log('cancelled');
    }
  }, {
    key: 'render',
    value: function render() {
      return _etch2['default'].dom(
        'div',
        { className: 'example' },
        _etch2['default'].dom(
          'div',
          { className: 'example-rendered' },
          _etch2['default'].dom(
            'atom-panel',
            { className: 'modal' },
            _etch2['default'].dom(_atomSelectList2['default'], {
              items: ['one', 'two', 'three'],
              elementForItem: this.elementForItem.bind(this),
              onDidConfirmSelection: this.didConfirmSelection.bind(this),
              onDidCancelSelection: this.didCancelSelection.bind(this) })
          )
        ),
        _etch2['default'].dom(
          'div',
          { className: 'example-code show-example-space-pen' },
          _etch2['default'].dom(_codeBlock2['default'], { cssClass: 'example-space-pen', grammarScopeName: 'source.js', code: this.jsExampleCode })
        )
      );
    }
  }, {
    key: 'update',
    value: function update() {}
  }]);

  return ExampleSelectListView;
})();

exports['default'] = ExampleSelectListView;
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;charset=utf-8;base64, 