System.register(["./p-7a5d5d62.system.js"],(function(t){"use strict";var s,i,a,e;return{setters:[function(t){s=t.r;i=t.h;a=t.H;e=t.g}],execute:function(){var n=":host{--panel-margin-top:0;--panel-padding:0;--gap-md:var(--pine-spacing-md);--gap-xs:var(--pine-spacing-xs);--gap-sm:16px var(--pine-spacing-sm);--outline:2px solid var(--pine-color-primary-200);display:block}*:focus{outline:var(--outline)}.pds-tabs__tablist{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--gap-md)}:host(.pds-tabs--availability) .pds-tabs__tablist{gap:var(--gap-xs)}:host(.pds-tabs--filter) .pds-tabs__tablist{gap:var(--gap-sm)}";var r=n;var f=t("pds_tabs",function(){function t(t){s(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 s=["ArrowLeft","ArrowRight","Home","End"];if(s.includes(t.key)){t.preventDefault();this.moveActiveTab(t.key)}};t.prototype.moveActiveTab=function(t){var s=0;var i=this.tabs.length-1;var a=null;switch(t){case"ArrowLeft":a=this.activeTabIndex===s?i:this.activeTabIndex+-1;break;case"ArrowRight":a=this.activeTabIndex===i?s:this.activeTabIndex+1;break;case"Home":a=s;break;case"End":a=i;break}this.tabs[a].children[0].focus();this.activeTabName=this.tabs[a].name;this.activeTabIndex=a};t.prototype.findAllChildren=function(){this.tabs=this.el.querySelectorAll("pds-tab");this.tabPanels=this.el.querySelectorAll("pds-tabpanel")};t.prototype.propGeneration=function(t,s){if(s===void 0){s=0}t.parentComponentId=this.componentId.toString();t.variant=this.variant.toString();t.selected=this.activeTabName===t.name?true:false;t["index"]=s};t.prototype.passPropsToChildren=function(){var t=this;this.tabs.forEach((function(s,i){if(t.activeTabName===s.name)t.activeTabIndex=i;t.propGeneration(s,i)}));this.tabPanels.forEach((function(s){t.propGeneration(s)}))};t.prototype.classNames=function(){var t="pds-tabs";if(this.variant&&this.variant!="primary"){var s="pds-tabs--".concat(this.variant);t+=" "+s}return t};t.prototype.componentWillLoad=function(){this.findAllChildren()};t.prototype.componentWillRender=function(){this.passPropsToChildren()};t.prototype.render=function(){return i(a,{key:"230c4abd9bf8632802f34df2a517ca2c1cc029bd","active-tab-name":this.activeTabName,class:this.classNames(),id:this.componentId},i("div",{key:"ad7935e2494c8fa731abaf17979f61ffa70d8ac3",class:"pds-tabs__tablist",role:"tablist","aria-label":this.tablistLabel},i("slot",{key:"3e3b604d8aa3391b23539914cd91bd6cafcfc4c9",name:"tabs"})),i("slot",{key:"7d8a5ee7b1b147816bedf6be0b24f8a57b422fe7",name:"tabpanels"}))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());f.style=r}}}));
//# sourceMappingURL=p-59db2abd.system.entry.js.map