"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ToolbarButton = (function () { function ToolbarButton(toolbarItem, clickHandler) { var _this = this; this.getElement = function () { var div = document.createElement('div'); if (_this.toolbarItem.name !== 'separator') { div.className = 'fc-whiteboardtoolbar-button'; if (_this.clickHandler) { div.addEventListener('click', function (ev) { if (_this.clickHandler) { _this.clickHandler(ev, _this.toolbarItem); } }); } if (_this.toolbarItem.icon) { div.title = _this.toolbarItem.tooltipText; div.innerHTML = _this.toolbarItem.icon; } else { div.innerText = _this.toolbarItem.tooltipText; } } else { div.className = 'fc-whiteboardtoolbar-separator'; } return div; }; this.toolbarItem = toolbarItem; if (clickHandler) { this.clickHandler = clickHandler; } } return ToolbarButton; }()); exports.ToolbarButton = ToolbarButton;