package com.atmob.keyboard_android.component

import android.content.Context
import android.util.AttributeSet
import android.view.View
import com.atmob.keyboard_android.R
import com.atmob.keyboard_android.component.base.BaseUIComponent
import com.atmob.keyboard_android.ext.click

/**
 * 粘贴内容栏
 */
class PasteBarComponent @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : BaseUIComponent(context, attrs, defStyleAttr) {
    private lateinit var vClearBtn: View

    override fun onInflateViewId(): Int {
        return R.layout.component_paste_bar
    }

    override fun findView(view: View) {
        vClearBtn = view.findViewById(R.id.clear_btn)
    }

    override fun bindView(view: View) {
        vClearBtn.click {
            // 清空输入框内容
        }
    }
}