import{r as t,c as s,h as i,g as e}from"./p-65ddb289.js";class h{constructor(i){t(this,i),this.disabled=!1,this.textWrap=!1,this.change=s(this,"change",7)}componentDidLoad(){this.materialsCheckbox=this.host.shadowRoot.querySelector("materials-checkbox"),this.checkboxInput=this.materialsCheckbox.shadowRoot.querySelector(".mdc-checkbox__native-control")}toggleCheckbox(){this.disabled||(this.checked=!this.checked,this.checkboxInput.checked=this.checked,this.change.emit(this.checked))}render(){return i("materials-list-item",{disabled:this.disabled,onClick:()=>this.toggleCheckbox(),itemEndStyle:this.itemEndStyle,itemStartStyle:this.itemStartStyle,noPadding:this.noPadding,size:this.size},i("materials-checkbox",{slot:"item-start",id:"materials-checkbox",color:this.color,value:this.value,checked:this.checked,disabled:this.disabled,onChange:t=>{t.preventDefault(),t.stopPropagation()}}),i("label",{class:{"mdc-typography":!0,"gmv-label-nowrap":!this.textWrap},title:this.label},this.label),i("div",{slot:"item-start"},i("slot",{name:"item-start"})),i("div",{slot:"item-end"},i("slot",{name:"item-end"})))}get host(){return e(this)}static get style(){return":host .gmv-label-nowrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"}}export{h as materials_list_item_checkbox};