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