"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[2655],{4493:function(a,e,t){function s(){return"rtl"===document.dir}t.d(e,{i:function(){return s}})},5036:function(a,e,t){t.r(e),t.d(e,{sc_tab:function(){return h}});var s=t(467),i=t(3029),r=t(2901),n=t(9280),c=t.n(n),o=t(1346),l=t(4493),f=0,h=function(){return(0,r.A)((function a(e){(0,i.A)(this,a),(0,o.r)(this,e),this.scClose=(0,o.c)(this,"scClose",7),this.componentId="tab-".concat(++f),this.panel="",this.href=void 0,this.active=!1,this.disabled=!1,this.count=void 0,this.hasPrefix=!1,this.hasSuffix=!1}),[{key:"triggerFocus",value:(e=(0,s.A)(c().mark((function a(e){return c().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:this.tab.focus(e);case 1:case"end":return a.stop()}}),a,this)}))),function(_x){return e.apply(this,arguments)})},{key:"triggerBlur",value:(a=(0,s.A)(c().mark((function a(){return c().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:this.tab.blur();case 1:case"end":return a.stop()}}),a,this)}))),function(){return a.apply(this,arguments)})},{key:"handleSlotChange",value:function(){this.hasPrefix=!!this.el.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.el.querySelector('[slot="suffix"]')}},{key:"render",value:function(){var a=this;this.el.id=this.el.id||this.componentId;var e=this.href?"a":"div";return(0,o.h)(e,{key:"d16bad31462e47b7882c20f4c8e7f6676981bbfe",part:"base ".concat(this.active?"active":""),href:this.href,class:{tab:!0,"tab--active":this.active,"tab--disabled":this.disabled,"tab--has-prefix":this.hasPrefix,"tab--has-suffix":this.hasSuffix,"tab--is-rtl":(0,l.i)()},ref:function(e){return a.tab=e},role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",tabindex:this.disabled?"-1":"0"},(0,o.h)("span",{key:"d5b57befcc2cf92e52ef364d417f09d3c74efb56",part:"prefix",class:"tab__prefix"},(0,o.h)("slot",{key:"4dfbef0a3469f9a1d12fba8d0eda5a043f8a4ee1",onSlotchange:function(){return a.handleSlotChange()},name:"prefix"})),(0,o.h)("div",{key:"b308abb29825fff55bb260d456a8d4bf08e708f5",class:"tab__content",part:"content"},(0,o.h)("slot",{key:"34a0a872cc665d52e2abbd48544086c6df0f22c7"})),(0,o.h)("span",{key:"7cc2b156a9e3514e39580123310ea8db704a2702",part:"suffix",class:"tab__suffix"},(0,o.h)("slot",{key:"1994ee24040a3d3c80c5839a8008f62aba8e6822",onSlotchange:function(){return a.handleSlotChange()},name:"suffix"})),(0,o.h)("slot",{key:"0017ec488420701f3bd1fd7ea7ce267be8355797",name:"suffix"},!!this.count&&(0,o.h)("div",{key:"5b8340936ee4ef32e2366d70cf995ee269ad6c25",class:"tab__counter",part:"counter"},this.count)))}},{key:"el",get:function(){return(0,o.a)(this)}}]);var a,e}();h.style=":host{display:block}.tab{font-family:var(--sc-font-sans);color:var(--sc-color-gray-600);display:flex;align-items:center;justify-content:flex-start;line-height:1;padding:var(--sc-spacing-small) var(--sc-spacing-small);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-semibold);border-radius:var(--sc-border-radius-small);cursor:pointer;transition:color 0.35s ease, background-color 0.35s ease;user-select:none;text-decoration:none}.tab.tab--active,.tab:hover{color:var(--sc-tab-active-color, var(--sc-color-gray-900));background-color:var(--sc-tab-active-background, var(--sc-color-gray-100))}.tab.tab--disabled{cursor:not-allowed;color:var(--sc-color-gray-400)}.tab__content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--sc-line-height-dense)}.tab__prefix,.tab__suffix{flex:0 0 auto;display:flex;align-items:center}.tab__suffix{margin-left:auto}.tab__counter{background:var(--sc-color-gray-200);display:inline-block;padding:var(--sc-spacing-xx-small) var(--sc-spacing-small);border-radius:var(--sc-border-radius-pill);font-size:var(--sc-font-size-small);text-align:center;line-height:1;transition:color 0.35s ease, background-color 0.35s ease}.tab.tab--active .tab__counter,.tab:hover .tab__counter{background:var(--sc-color-white)}.tab--has-prefix{padding-left:var(--sc-spacing-small)}.tab--has-prefix .tab__content{padding-left:var(--sc-spacing-small)}.tab--has-suffix{padding-right:var(--sc-spacing-small)}.tab--has-suffix .tab__label{padding-right:var(--sc-spacing-small)}.tab--is-rtl.tab--has-prefix .tab__content{padding-left:0;padding-right:var(--sc-spacing-small)}"}}]);