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