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

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.nivesh.production.partnerOnBoarding.R
import com.nivesh.production.partnerOnBoarding.databinding.FragmentQuestionBinding
import com.nivesh.production.partnerOnBoarding.ui.activities.SignUpActivity

class QuestionsFragment : BaseFragment() {
    private var _binding: FragmentQuestionBinding? = null
    private val binding get() = _binding!!

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

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

    private fun init() {
        binding.header.tvHelpCall.visibility = View.VISIBLE
        binding.header.tvTitle.text = getString(R.string.questions)
        binding.tvMsg.text = getString(R.string.questionsContent)//questionsContent
        binding.header.ivBack.setOnClickListener{
            (activity as SignUpActivity).onBackPressedDispatcher.onBackPressed()
        }

        binding.header.tvHelpCall.setOnClickListener{
            val intent = Intent(Intent.ACTION_CALL);
            intent.data = Uri.parse("tel:18001801818")
            startActivity(intent)
        }
    }
}