(function(a,b){'object'==typeof exports&&'object'==typeof module?module.exports=b(require('react'),require('hadron-react-components')):'function'==typeof define&&define.amd?define(['react','hadron-react-components'],b):'object'==typeof exports?exports.InstancePlugin=b(require('react'),require('hadron-react-components')):a.InstancePlugin=b(a.react,a['hadron-react-components'])})('undefined'==typeof self?this:self,function(a,b){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='./',b(b.s=0)}([function(a,b,c){'use strict';function d(b){b.registerRole('Instance.Workspace',h)}function e(b){b.deregisterRole('Instance.Workspace',h),b.deregisterAction('Instance.Actions'),b.deregisterStore('Instance.Store')}Object.defineProperty(b,'__esModule',{value:!0}),c.d(b,'activate',function(){return d}),c.d(b,'deactivate',function(){return e});var f=c(1),g=c.n(f),h={name:'Instance',component:g.a};b['default']=g.a},function(a,b,c){function d(c,a){if(!(c instanceof a))throw new TypeError('Cannot call a class as a function')}function e(c,d){if(!c)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return d&&('object'==typeof d||'function'==typeof d)?d:c}function f(c,d){if('function'!=typeof d&&null!==d)throw new TypeError('Super expression must either be null or a function, not '+typeof d);c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(c,d):c.__proto__=d)}var g=function(){function e(e,f){for(var b,c=0;c<f.length;c++)b=f[c],b.enumerable=b.enumerable||!1,b.configurable=!0,'value'in b&&(b.writable=!0),Object.defineProperty(e,b.key,b)}return function(a,b,c){return b&&e(a.prototype,b),c&&e(a,c),a}}(),h=c(2),i=c(3),j=i.TabNavBar,k=i.UnsafeComponent,l=function(c){function i(b){d(this,i);var a=e(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,b));return a.state={activeTab:0},a.setupTabs(),a}return f(i,c),g(i,[{key:'onTabClicked',value:function(b){this.state.activeTab===b||this.setState({activeTab:b})}},{key:'setupTabs',value:function(){var d=global.hadronApp.appRegistry.getRole('Instance.Tab'),a=d.map(function(b){return b.name}),b=d.map(function(c,a){return h.createElement(k,{component:c.component,key:a})});this.tabs=a,this.views=b}},{key:'render',value:function(){return h.createElement('div',{className:'rtss'},h.createElement(j,{theme:'light',tabs:this.tabs,views:this.views,activeTabIndex:this.state.activeTab,onTabClicked:this.onTabClicked.bind(this),className:'rt-nav',mountAllViews:!1}))}}]),i}(h.Component);l.displayName='InstanceComponent',a.exports=l},function(b){b.exports=a},function(a){a.exports=b}])});
//# sourceMappingURL=index.js.map