import{p as e,H as o,c as t,h as i,t as n}from"./p-Bpcl2TqF.js";import{d as s}from"./p-KvSIaMXJ.js";const r=()=>`.dropdown-item{text-decoration:none;color:#1D1D1D;display:flex;align-items:center;padding:8px 16px;gap:8px;font-family:var(--ifx-font-family)}.dropdown-item:focus{outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.dropdown-item.hide{display:none}.dropdown-item span{color:#1D1D1D;font-size:16px;font-style:normal;font-weight:400;line-height:24px;}.dropdown-item.small span{font-size:14px}.dropdown-item:hover{cursor:pointer;background-color:#EEEDED}.dropdown-item:active{background-color:#BFBBBB}.dropdown-item.error{color:#CD002F}.dropdown-item.error span{color:#CD002F}.icon{margin-right:4px}`;const d=e(class e extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.ifxDropdownItem=t(this,"ifxDropdownItem",7)}icon;href="";target="_self";hide=false;error=false;size="l";ifxDropdownItem;get el(){return this}handleMenuSize(e){this.size=e.detail}handleEventEmission(){this.ifxDropdownItem.emit(this.el.textContent)}render(){const e=this.href!==undefined&&this.href!==null&&this.href!=="";const o={class:`dropdown-item ${this.size==="s"?"small":""} ${this.hide?"hide":""} ${this.error?"error":""}`,onClick:()=>this.handleEventEmission(),role:"menuitem"};if(!e)o.tabIndex=0;return i("a",{key:"ce14919e0b2dc157d12e9e3fa9b938a91395ec80",...o,...e?{href:this.href,target:this.target,error:this.error}:{}},this.icon&&i("ifx-icon",{key:"a12b67769ecf4e4c3ef252e6c67ef784647014c4",class:"icon",icon:this.icon}),i("span",{key:"d0b40bddd0bedf4e3c39af19339a387665d02812"},i("slot",{key:"4043c5aa45aed6ae94762ae43f318fe6f1073c1d"})))}static get style(){return r()}},[769,"ifx-dropdown-item",{icon:[1],href:[1],target:[1],hide:[4],error:[4],size:[32]},[[16,"menuSize","handleMenuSize"]]]);function c(){if(typeof customElements==="undefined"){return}const e=["ifx-dropdown-item","ifx-icon"];e.forEach((e=>{switch(e){case"ifx-dropdown-item":if(!customElements.get(n(e))){customElements.define(n(e),d)}break;case"ifx-icon":if(!customElements.get(n(e))){s()}break}}))}const a=d;const f=c;export{a as IfxDropdownItem,f as defineCustomElement};
//# sourceMappingURL=ifx-dropdown-item.js.map