package com.base.scanqrclear.bean

data class TelephoneUIBean(
    var tel: String = ""
) : ScanBean(FunctionUIBean.KEY_TELEPHONE) {

    companion object {

        fun isTelephoneQR(qrCodeValue: String): Boolean {
            if (qrCodeValue.startsWith("tel:")) {
                return true
            }
            return false
        }

        fun createTelephoneBean(qrCodeValue: String): TelephoneUIBean {
            val bean = TelephoneUIBean()
            val kv = qrCodeValue.split(":")
            bean.tel = kv[1]
            return bean
        }
    }
}