package com.kdanmobile.reader.thumb.mode

import android.app.Activity
import com.kdanmobile.reader.thumb.PdfThumbActivity
import com.kdanmobile.reader.thumb.PdfThumbAdapter

class EditMode: Mode() {
    override fun onClickToolBarNavigation() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun updateToolbar() {
        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
    }

    override fun onPageItemClick(activity: Activity, pageIndex: Int, operate: Int, selectMap: MutableMap<Int,Boolean>, pdfThumbAdapter: PdfThumbAdapter){
        selectMap[pageIndex]?.also {
            selectMap[pageIndex] = !it
        }
        pdfThumbAdapter.notifyItemChanged(pageIndex)
        (activity as PdfThumbActivity).updateToolbar()
    }
}