package com.zswc.lookimg.component

import com.billy.cc.core.component.CC
import com.billy.cc.core.component.CCResult
import com.billy.cc.core.component.IComponent
import com.zswc.lookimg.ImagePagerActivity
import com.ysnows.base.ccextension.BIComponent
import com.ysnows.base.utils.B
import com.ysnows.base.utils.UiSwitch
import java.util.*

/**
 *Created by shihuiyun
 *on 2020/9/18
 */
class CpLookimg: BIComponent() , IComponent {

    fun previewImageArr(cc: CC,urls: ArrayList<String>,position:Int): Boolean {

        UiSwitch.bundle(cc.context, ImagePagerActivity::class.java,
                B.with().putStringArrayList("urls", urls)
                        .putInt("position", position)
                        .ok())
        CC.sendCCResult(cc.getCallId(), CCResult.success())
        return false
    }

}
