"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[2655],{4493:function(a,t,e){function s(){return"rtl"===document.dir}e.d(t,{i:function(){return s}})},5036:function(a,t,e){e.r(t),e.d(t,{sc_tab:function(){return d}});var s=e(467),i=e(3029),r=e(2901),c=e(9280),n=e.n(c),o=e(1346),l=e(4493),f=0,d=function(){return(0,r.A)((function a(t){(0,i.A)(this,a),(0,o.r)(this,t),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:(t=(0,s.A)(n().mark((function a(t){return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:this.tab.focus(t);case 1:case"end":return a.stop()}}),a,this)}))),function(_x){return t.apply(this,arguments)})},{key:"triggerBlur",value:(a=(0,s.A)(n().mark((function a(){return n().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 t=this.href?"a":"div";return(0,o.h)(t,{key:"67dc6e9d4fc3b03405b95d73860d0607b1349dac",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(t){return a.tab=t},role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",tabindex:this.disabled?"-1":"0"},(0,o.h)("span",{key:"edbced0df2b42aad7538d658f61491492a960d70",part:"prefix",class:"tab__prefix"},(0,o.h)("slot",{key:"c3a83ae9dfcbe0cd3f44f921ac4b16f70bb1ad19",onSlotchange:function(){return a.handleSlotChange()},name:"prefix"})),(0,o.h)("div",{key:"8e1c4a2e772f466e05d57db467f9c6770744e54c",class:"tab__content",part:"content"},(0,o.h)("slot",{key:"0f2e2522e62e76bbfbf0d38087f636c9c08345c4"})),(0,o.h)("span",{key:"bedcb638ce2e070f4b1de5cf6286b71b972a974e",part:"suffix",class:"tab__suffix"},(0,o.h)("slot",{key:"8fa99c53e36534b260c5d92924bfda6ba81374f5",onSlotchange:function(){return a.handleSlotChange()},name:"suffix"})),(0,o.h)("slot",{key:"28b079ac845a18c6798a9b39341025e2299be0bf",name:"suffix"},!!this.count&&(0,o.h)("div",{key:"c7738b146feca28aefcf203eec911890d94b2c0a",class:"tab__counter",part:"counter"},this.count)))}},{key:"el",get:function(){return(0,o.a)(this)}}]);var a,t}();d.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)}"}}]);