package com.pan_american.android.ui.financial_module.collection_bill

import android.os.Bundle
import com.pan_american.android.R
import com.pan_american.android.base.BaseActivity
import com.pan_american.android.databinding.ActivityCollectionBillBinding
import com.pan_american.android.databinding.LayoutTitleBinding

class CollectionBillActivity : BaseActivity<ActivityCollectionBillBinding>() {

    private lateinit var titleBinding: LayoutTitleBinding

    override fun getViewBinding() = ActivityCollectionBillBinding.inflate(layoutInflater)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        initTitle()

        initViews()
    }

    override fun initTitle() {
        titleBinding = LayoutTitleBinding.bind(binding.root).apply {
            titleText.text = resources.getString(R.string.collection_bill)

            backButton.setOnClickListener {
                back()
            }
        }
    }

    override fun initViews() {
        supportFragmentManager.beginTransaction().addToBackStack(null)
            .add(binding.collectionBillFragmentContainer.id, CollectionBillGroupListFragment()).commit()
    }
}