package com.pan_american.android.ui.customer_resource.related_invitee

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

class RelatedInviteeActivity : BaseActivity<ActivityRelatedInviteeBinding>() {

    private lateinit var titleBinding: LayoutTitleBinding

    override fun getViewBinding() = ActivityRelatedInviteeBinding.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.group_related_invitee)

            backButton.setOnClickListener {
                back()
            }
        }
    }

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