index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/2748.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[2748],{2748:function(t,n,e){e.r(n),e.d(n,{sc_button_group:function(){return a}});var o=e(5671),u=e(3144),s=e(8860),a=function(){function t(n){(0,o.Z)(this,t),(0,s.r)(this,n),this.label=void 0,this.separate=void 0}return(0,u.Z)(t,[{key:"findButton",value:function(t){return["sc-button"].includes(t.tagName.toLowerCase())?t:t.querySelector(["sc-button"].join(","))}},{key:"handleFocus",value:function(t){var n=this.findButton(t.target);null==n||n.classList.add("sc-button-group__button--focus")}},{key:"handleBlur",value:function(t){var n=this.findButton(t.target);null==n||n.classList.remove("sc-button-group__button--focus")}},{key:"handleMouseOver",value:function(t){var n=this.findButton(t.target);null==n||n.classList.add("sc-button-group__button--hover")}},{key:"handleMouseOut",value:function(t){var n=this.findButton(t.target);null==n||n.classList.remove("sc-button-group__button--hover")}},{key:"handleSlotChange",value:function(){var t=this;if(!this.separate){var n=this.el.shadowRoot.querySelector("slot").assignedElements({flatten:!0});n.forEach((function(e){var o=t.el.shadowRoot.querySelector("slot").assignedNodes().indexOf(e),u=t.findButton(e);null===u&&t.separate||(u.classList.add("sc-button-group__button"),u.classList.toggle("sc-button-group__button--first",0===o),u.classList.toggle("sc-button-group__button--inner",o>0&&o<n.length-1),u.classList.toggle("sc-button-group__button--last",o===n.length-1))}))}}},{key:"render",value:function(){var t=this;return(0,s.h)("sc-form-control",{part:"base",class:{"button-group":!0,"button-group--separate":this.separate},role:"group","aria-label":this.label,onFocusout:function(n){return t.handleBlur(n)},onFocusin:function(n){return t.handleFocus(n)},onMouseOver:function(n){return t.handleMouseOver(n)},onMouseOut:function(n){return t.handleMouseOut(n)},label:this.label},(0,s.h)("slot",{onSlotchange:function(){return t.handleSlotChange()}}))}},{key:"el",get:function(){return(0,s.a)(this)}}]),t}();a.style=":host{display:inline-block;--gap:var(--sc-spacing-small)}.button-group{display:flex;flex-wrap:wrap}.button-group--separate{gap:var(--gap)}"}}]);