package com.nivesh.production.partnerOnBoarding.ui.fragments

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.nivesh.production.partnerOnBoarding.databinding.FragmentPagerStepTwoBinding
import com.nivesh.production.partnerOnBoarding.ui.activities.ViewPagerActivity

class StepTwoPagerFragment : Fragment() {
    private var _binding: FragmentPagerStepTwoBinding? = null
    private val binding get() = _binding!!

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
    ): View {
        _binding = FragmentPagerStepTwoBinding.inflate(inflater, container, false)
        return binding.root
    }


    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        init()
    }

    private fun init() {
        binding.btnNext.setOnClickListener {
            (activity as ViewPagerActivity).stepThreeApi()
        }
        binding.btnBack.setOnClickListener {
            (activity as ViewPagerActivity).stepOneApi()
        }
    }
}