package net.pokeranalytics.android.ui.extensions

import com.google.android.material.chip.ChipGroup

class ChipGroupExtension {

	open class SingleSelectionOnCheckedListener : ChipGroup.OnCheckedChangeListener {
		override fun onCheckedChanged(group: ChipGroup, checkedId: Int) {
			for (i in 0 until group.childCount) {
				val chip = group.getChildAt(i)
				chip.isClickable = chip.id != group.checkedChipId
			}
		}
	}

}