package com.philkes.notallyx.utils.changehistory

import com.philkes.notallyx.presentation.view.note.listitem.ListManager

class ChangeCheckedForAllChange(
    internal val checked: Boolean,
    internal val changedIds: Collection<Int>,
    private val listManager: ListManager,
) : Change {
    override fun redo() {
        listManager.checkByIds(checked, changedIds, true)
    }

    override fun undo() {
        listManager.checkByIds(!checked, changedIds, true)
    }

    override fun toString(): String {
        return "ChangeCheckedForAllChange checked: $checked changedIds: ${changedIds.joinToString(",")}"
    }
}
