import{r as t,h as n}from"./p-a5747bb7.js";class e{constructor(n){t(this,n)}componentDidLoad(){this.materialsMenuEl.setPosition(this.menuPosition),this.buttonType&&(this.buttonEl[this.buttonType]=!0)}componentWillUpdate(){this.buttonType&&(this.buttonEl[this.buttonType]=!0)}async openMenu(){this.materialsMenuEl.open()}async closeMenu(){this.materialsMenuEl.close()}async isOpen(){return this.materialsMenuEl.isOpen()}renderIconHelper(){return this.iconHelper?n("materials-icon",{style:{"margin-left":"8px","margin-right":"-8px"},name:this.iconHelper}):""}render(){return n("div",null,this.iconOnly&&n("materials-icon-button",{onClick:()=>this.openMenu(),icon:this.icon}),!this.iconOnly&&n("materials-button",{color:this.color,onClick:()=>this.openMenu(),icon:this.icon,ref:t=>this.buttonEl=t},this.menuTitle,this.renderIconHelper()),n("materials-menu",{ref:t=>this.materialsMenuEl=t},n("slot",null)))}static get style(){return"materials-list-item>a{color:inherit;text-decoration:none}materials-menu{white-space:nowrap}"}}export{e as materials_dropdown};