System.register(["./p-DYlgS5d7.system.js"],(function(t){"use strict";var i,s,a,e;return{setters:[function(t){i=t.r;s=t.h;a=t.H;e=t.a}],execute:function(){var n=":host{--tabs-dimension-panel-margin-top:var(--pine-dimension-none);--tabs-dimension-panel-padding:0;display:block}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-md)}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--pine-dimension-xs)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--pine-dimension-sm)}:host(.pds-tabs--pill) .pds-tabs__tablist{background-color:var(--pine-color-background-app);border:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-radius:var(--pine-dimension-100);display:-ms-inline-flexbox;display:inline-flex;display:-ms-flexbox;display:flex;gap:0;height:var(--pine-dimension-450)}";var r=t("pds_tabs",function(){function t(t){i(this,t)}t.prototype.tabClickHandler=function(t){if(this.componentId===t.detail[1]){this.activeTabIndex=t.detail[0];this.activeTabName=this.tabs[this.activeTabIndex].name}};t.prototype.handleKeyDown=function(t){var i=["ArrowLeft","ArrowRight","Home","End"];var s=t.target;var a=s.closest("pds-tab");var e=a&&a.closest("pds-tabs")===this.el;if(i.includes(t.key)&&e){t.preventDefault();this.moveActiveTab(t.key)}};t.prototype.moveActiveTab=function(t){var i=0;var s=this.tabs.length-1;var a=null;switch(t){case"ArrowLeft":a=this.activeTabIndex===i?s:this.activeTabIndex+-1;break;case"ArrowRight":a=this.activeTabIndex===s?i:this.activeTabIndex+1;break;case"Home":a=i;break;case"End":a=s;break}this.tabs[a].children[0].focus();this.activeTabName=this.tabs[a].name;this.activeTabIndex=a};t.prototype.findAllChildren=function(){var t=this;var i=Array.from(this.el.querySelectorAll("pds-tab"));var s=Array.from(this.el.querySelectorAll("pds-tabpanel"));this.tabs=i.filter((function(i){return i.closest("pds-tabs")===t.el}));this.tabPanels=s.filter((function(i){return i.closest("pds-tabs")===t.el}))};t.prototype.propGeneration=function(t,i){if(i===void 0){i=0}t.parentComponentId=this.componentId.toString();t.variant=this.variant.toString();t.selected=this.activeTabName===t.name?true:false;t["index"]=i};t.prototype.passPropsToChildren=function(){var t=this;this.tabs.forEach((function(i,s){if(t.activeTabName===i.name)t.activeTabIndex=s;t.propGeneration(i,s)}));this.tabPanels.forEach((function(i){t.propGeneration(i)}))};t.prototype.classNames=function(){var t="pds-tabs";if(this.variant&&this.variant!="primary"){var i="pds-tabs--".concat(this.variant);t+=" "+i}return t};t.prototype.componentWillLoad=function(){this.findAllChildren()};t.prototype.componentWillRender=function(){this.passPropsToChildren()};t.prototype.render=function(){return s(a,{key:"213dfbe8f2828b430ab81dce23f43c2137206861","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},s("div",{key:"68989e852e2eeed180f91e5ac901c4318d6c0d70",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel,part:"tab-list"},s("slot",{key:"4a06996745c049fdaf830460e8d57caefd50900b",name:"tabs"})),s("slot",{key:"e0558392bff0955defb133b36dd4e7360f33acce",name:"tabpanels"}))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());r.style=n}}}));
//# sourceMappingURL=p-9b3aedeb.system.entry.js.map