System.register(["./p-a19ac0ae.system.js"],(function(t){"use strict";var e,a;return{setters:[function(t){e=t.r;a=t.h}],execute:function(){function i(t,e){return t<e?-1:t>e?1:0}function n(t,e){return t===e}var l={equals:n,compare:i};function s(t){return function(e,a){return t.compare(e,a)===1?a:e}}function r(t){return function(e,a){return t.compare(e,a)===-1?a:e}}function c(t){var e=s(t);var a=r(t);return function(t,i){return function(n){return a(e(n,i),t)}}}var o="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{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0;margin:0;background-color:#f7fafc;background-color:var(--color-neutral-100,#f7fafc)}";var u="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;padding:0;margin:0}";var f=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=c(l)(0,a.tabs.length-1);a.selectTab(i(a.activeTabIndex+e))}}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:function(a){a.preventDefault();t.selectTab(i);e.onClick&&e.onClick(a)},tabIndex:i===t.activeTabIndex?0:-1})})))};return t}());f.elementName="stencila-tab-list";f.style={default:o,material:u}}}}));