import{r as e,c as t,h as i,H as n}from"./p-326e6826.js";const r=":host{display:block}a{text-decoration:none}img{width:100%}";var a=undefined&&undefined.__classPrivateFieldGet||function(e,t,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(e):n?n.value:t.get(e)};var o,s;const d=class{constructor(i){e(this,i);this.klevuBannerClick=t(this,"klevuBannerClick",7);o.add(this);this.imageUrl=undefined;this.linkUrl=undefined;this.altText=undefined;this.target="_blank"}render(){return i(n,null,i("slot",null,i("a",{href:this.linkUrl,target:this.target,onClick:a(this,o,"m",s).bind(this)},i("img",{part:"banner-image",src:this.imageUrl,alt:this.altText}))))}};o=new WeakSet,s=function e(t){const i=this.klevuBannerClick.emit(this.linkUrl);if(i.defaultPrevented){t.preventDefault();return false}};d.style=r;const l=":host{--padding:var(--klevu-dropdown-padding, calc(var(--klevu-size-m) - (var(--klevu-body-s-size) / 2)));display:block}select{font-size:var(--klevu-body-s-size);font-weight:var(--klevu-body-s-weight);appearance:none;width:100%;min-width:80px;border:none;border-radius:var(--klevu-border-radius-m);height:calc(var(--klevu-size-m) * 2);padding:0 var(--padding);padding-right:30px}.selectcontainer{position:relative;display:flex}.selectcontainer.inline{display:inline-block}.selectcontainer.inline select{width:auto}.selectcontainer.default{border:1px solid var(--klevu-color-neutral-4);border-radius:var(--klevu-border-radius-m)}select:focus{outline:0}.selectcontainer:has(select:active,select:focus){border:1px solid var(--klevu-color-primary)}.triangle{position:absolute;right:5px;top:50%;transform:translateY(-50%);display:block;font-size:20px;height:24px;width:24px;pointer-events:none}.selectcontainer.disabled{cursor:not-allowed}.selectcontainer.disabled select{cursor:not-allowed}.selectcontainer.disabled .triangle{background-color:var(--klevu-color-neutral-4)}";var c=undefined&&undefined.__classPrivateFieldGet||function(e,t,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(e):n?n.value:t.get(e)};var h,u;const f=class{constructor(i){e(this,i);this.klevuDropdownChanged=t(this,"klevuDropdownChanged",7);h.add(this);this.name=undefined;this.options=undefined;this.disabled=undefined;this.selected=undefined;this.variant="default"}render(){var e;return i(n,null,i("div",{class:{selectcontainer:true,disabled:Boolean(this.disabled),inline:this.variant==="inline",default:this.variant==="default"},part:"dropdown-base"},i("select",{name:this.name,disabled:this.disabled,onChange:c(this,h,"m",u).bind(this),part:"dropdown-select"},(e=this.options)===null||e===void 0?void 0:e.map((e=>i("option",{selected:this.selected===e.value,value:e.value},e.text)))),i("klevu-icon",{name:"expand_more",class:"triangle"})))}};h=new WeakSet,u=function e(t){this.klevuDropdownChanged.emit(t.target.value)};f.style=l;var p=undefined&&undefined.__classPrivateFieldGet||function(e,t,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(e):n?n.value:t.get(e)};var m,w;const v=class{constructor(i){e(this,i);this.klevuSizeChanged=t(this,"klevuSizeChanged",7);m.add(this);this.sizes=[{name:"xs",minWidth:0,maxWidth:319},{name:"sm",minWidth:320,maxWidth:511},{name:"md",minWidth:512,maxWidth:991},{name:"lg",minWidth:992,maxWidth:1199},{name:"xl",minWidth:1200,maxWidth:9999}]}connectedCallback(){for(const e of this.sizes){window.matchMedia(`(min-width: ${e.minWidth}px) and (max-width: ${e.maxWidth}px)`).addEventListener("change",p(this,m,"m",w).bind(this))}}disconnectedCallback(){for(const e of this.sizes){window.matchMedia(`(min-width: ${e.minWidth}px) and (max-width: ${e.maxWidth}px)`).removeEventListener("change",p(this,m,"m",w).bind(this))}}async getCurrentSize(){for(const e of this.sizes){if(window.matchMedia(`(min-width: ${e.minWidth}px)  and (max-width: ${e.maxWidth}px)`).matches){return e}}}render(){return null}};m=new WeakSet,w=function e(t){if(!t.matches){return}for(const e of this.sizes){if(t.media.indexOf(`min-width: ${e.minWidth}px`)>-1){this.klevuSizeChanged.emit(e)}}};export{d as klevu_banner,f as klevu_dropdown,v as klevu_util_viewport};
//# sourceMappingURL=p-24dee730.entry.js.map