import{r as e,c as i,h as t,H as n}from"./p-23359d3b.js";const r=":host{display:block}select{--padding:calc(var(--klevu-size-m) - (var(--klevu-body-s-size) / 2));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-border)}";var o=undefined&&undefined.__classPrivateFieldGet||function(e,i,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?e!==i||!n:!i.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(e):n?n.value:i.get(e)};var a,s;const l=class{constructor(t){e(this,t);this.klevuDropdownChanged=i(this,"klevuDropdownChanged",7);a.add(this);this.name=undefined;this.options=undefined;this.disabled=undefined;this.selected=undefined;this.variant="default"}render(){var e;return t(n,null,t("div",{class:{selectcontainer:true,disabled:Boolean(this.disabled),inline:this.variant==="inline",default:this.variant==="default"}},t("select",{name:this.name,disabled:this.disabled,onChange:o(this,a,"m",s).bind(this)},(e=this.options)===null||e===void 0?void 0:e.map((e=>t("option",{selected:this.selected===e.value,value:e.value},e.text)))),t("klevu-icon",{name:"expand_more",class:"triangle"})))}};a=new WeakSet,s=function e(i){this.klevuDropdownChanged.emit(i.target.value)};l.style=r;export{l as klevu_dropdown};
//# sourceMappingURL=p-38ce29e5.entry.js.map