System.register(["./p-24afd2bd.system.js"],(function(t){"use strict";var e,a;return{setters:[function(t){e=t.r;a=t.h}],execute:function(){var i=function(t){return function(e,a){return e===a||t.compare(e,a)<1?e:a}};var n=function(t){return function(e,a){return e===a||t.compare(e,a)>-1?e:a}};var l=function(t){var e=i(t);var a=n(t);return function(t,i){return function(n){return a(e(n,i),t)}}};var r={equals:function(t,e){return t===e}};var s={equals:r.equals,compare:function(t,e){return t<e?-1:t>e?1:0}};var c="stencila-tab-list.sc-stencila-tab-list-default{display:block}.sc-stencila-tab-list-default-h ul.sc-stencila-tab-list-default,stencila-tab-list.sc-stencila-tab-list-default ul.sc-stencila-tab-list-default,ul[role=tablist].sc-stencila-tab-list-default{background-color:#e9eaf1;background-color:var(--color-neutral-50,#e9eaf1);display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:0;padding:0}";var o="stencila-tab-list.sc-stencila-tab-list-material{display:block}.sc-stencila-tab-list-material-h ul.sc-stencila-tab-list-material,ul[role=tablist].sc-stencila-tab-list-material{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:0;padding:0}";var u=t("stencila_tab_list",function(){function t(t){var a=this;e(this,t);this.activeTabIndex=0;this.onKeyboardNavigateTabs=function(t){var e=t.key==="ArrowRight"?1:t.key==="ArrowLeft"?-1:0;var i=l(s)(0,a.tabs.length-1);a.selectTab(i(a.activeTabIndex+e))};this.clickHandler=function(t,e){return function(i){var n;i.preventDefault();a.selectTab(e);(n=t.onClick)===null||n===void 0?void 0:n.call(t,i)}}}t.prototype.selectTab=function(t){this.activeTabIndex=t};t.prototype.render=function(){var t=this;return a("ul",{role:"tablist",onKeyDown:this.onKeyboardNavigateTabs},this.tabs.map((function(e,i){return a("stencila-tab",{isSelected:e.isSelected===true||e.isSelected===undefined&&i===t.activeTabIndex,label:e.label,onClick:t.clickHandler(e,i),tabIndex:i===t.activeTabIndex?0:-1})})))};return t}());u.style={default:c,material:o}}}}));
//# sourceMappingURL=p-13da0145.system.entry.js.map