'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});
exports.default = HeaderAction;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _Action = require('../../Actions/Action');

var _Action2 = _interopRequireDefault(_Action);

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

function HeaderAction(_ref) {
	var action = _ref.action,
	    index = _ref.index;

	function onClick(event) {
		console.log('JSO Click');
		if (action.onClick) {
			action.onClick(event, { value: event.target.value });
		}
	}

	return _react2.default.createElement(_Action2.default, {
		key: index + '-enum-header-action',
		label: action.label,
		icon: action.icon,
		onClick: onClick,
		btooltipPlacement: 'bottom',
		inProgress: action.inProgress,
		hideLabel: true,
		link: true
	});
}