text: define(["exports"],function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.SelectionMixin=void 0;_exports.SelectionMixin=superClass=>(class SelectionMixin extends superClass{static get properties(){return{selectedItems:{type:Object,notify:!0,value:()=>[]}}}static get observers(){return["_selectedItemsChanged(selectedItems.*)"]}_isSelected(item){return this.selectedItems&&this._getItemIndexInArray(item,this.selectedItems)>-1}selectItem(item){this._isSelected(item)||this.push("selectedItems",item)}deselectItem(item){const index=this._getItemIndexInArray(item,this.selectedItems);index>-1&&this.splice("selectedItems",index,1)}_toggleItem(item){-1===this._getItemIndexInArray(item,this.selectedItems)?this.selectItem(item):this.deselectItem(item)}_selectedItemsChanged(e){!this.$.items.children.length||"selectedItems"!==e.path&&"selectedItems.splices"!==e.path||Array.from(this.$.items.children).forEach(row=>{this._updateItem(row,row._item)})}_selectedInstanceChangedCallback(instance,value){super._selectedInstanceChangedCallback&&super._selectedInstanceChangedCallback(instance,value),value?this.selectItem(instance.item):this.deselectItem(instance.item)}})});