System.register(["./p-26626013.system.js"],(function(t){"use strict";var i,a,s,e;return{setters:[function(t){i=t.r;a=t.h;s=t.H;e=t.g}],execute:function(){var n=":host{--spacing-panel-margin-top:0;--spacing-panel-padding:0;--outline:2px solid var(--pine-color-blue-200);--spacing-gap-availability:var(--pine-spacing-100);--spacing-gap-default:var(--pine-spacing-300);--spacing-gap-filter:var(--pine-spacing-200);display:block}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--spacing-gap-default)}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--spacing-gap-availability)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--spacing-gap-filter)}";var r=n;var c=t("pds_tabs",function(){function t(t){i(this,t);this.tablistLabel=undefined;this.componentId=undefined;this.variant=undefined;this.activeTabName=undefined;this.activeTabIndex=undefined}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"];if(i.includes(t.key)){t.preventDefault();this.moveActiveTab(t.key)}};t.prototype.moveActiveTab=function(t){var i=0;var a=this.tabs.length-1;var s=null;switch(t){case"ArrowLeft":s=this.activeTabIndex===i?a:this.activeTabIndex+-1;break;case"ArrowRight":s=this.activeTabIndex===a?i:this.activeTabIndex+1;break;case"Home":s=i;break;case"End":s=a;break}this.tabs[s].children[0].focus();this.activeTabName=this.tabs[s].name;this.activeTabIndex=s};t.prototype.findAllChildren=function(){this.tabs=this.el.querySelectorAll("pds-tab");this.tabPanels=this.el.querySelectorAll("pds-tabpanel")};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,a){if(t.activeTabName===i.name)t.activeTabIndex=a;t.propGeneration(i,a)}));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 a(s,{key:"a36e242d5e746954f80778cf515879ca82258978","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},a("div",{key:"d6d89fd90a9a534f249c549e34308ed245773f60",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel},a("slot",{key:"9b5e5268c27ecf2a5331cec64d2c7121cef366a1",name:"tabs"})),a("slot",{key:"b835cf1befe68f54b1751a976846d271ce97634e",name:"tabpanels"}))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());c.style=r}}}));
//# sourceMappingURL=p-9028ed17.system.entry.js.map