package com.pan_american.android.ui.group_invite_official.invite_official_payment_insert

import android.os.Bundle
import com.pan_american.android.OASystem
import com.pan_american.android.R
import com.pan_american.android.base.BaseActivity
import com.pan_american.android.databinding.ActivityInviteOfficialPaymentBinding
import com.pan_american.android.databinding.LayoutTitleBinding
import com.pan_american.android.ui.group_simple_info.GroupSimpleInfoFragment

class InviteOfficialPaymentInsertActivity : BaseActivity<ActivityInviteOfficialPaymentBinding>() {

    private lateinit var titleBinding: LayoutTitleBinding

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

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

        initViews()
        initEvents()
    }

    override fun initViews() {
        titleBinding = LayoutTitleBinding.bind(binding.root).apply {
            titleText.text = resources.getString(R.string.invite_official_payment)
        }

        val bundle = Bundle().apply {
            putInt("id", OASystem.C_TABLE_INVITE_OFFICIAL)
        }

        val groupSimpleInfoFragment = GroupSimpleInfoFragment()
        groupSimpleInfoFragment.arguments = bundle


        supportFragmentManager.beginTransaction().addToBackStack(null)
            .add(binding.inviteOfficialFragmentContainer.id, groupSimpleInfoFragment).commit()
    }

    override fun initEvents() {

        titleBinding.backButton.setOnClickListener {
            back()
        }

    }
}