import{r as t,h as i}from"./p-65ddb289.js";class s{constructor(i){t(this,i)}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?i("materials-icon",{style:{"margin-left":"8px","margin-right":"-8px"},name:this.iconHelper}):""}render(){return i("div",null,this.iconOnly&&i("materials-icon-button",{onClick:()=>this.openMenu(),icon:this.icon}),!this.iconOnly&&i("materials-button",{color:this.color,onClick:()=>this.openMenu(),icon:this.icon,ref:t=>this.buttonEl=t},this.menuTitle,this.renderIconHelper()),i("materials-menu",{ref:t=>this.materialsMenuEl=t},i("slot",null)))}static get style(){return"materials-list-item>a{color:inherit;text-decoration:none}materials-menu{white-space:nowrap}"}}export{s as materials_dropdown};