package com.example.doctor.Enternet

import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.doctor.MainActivity
import com.example.doctor.databinding.FragmentEnternetBinding


class EnternetFragment : Fragment() {
    private lateinit var binding: FragmentEnternetBinding
    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding = FragmentEnternetBinding.inflate(layoutInflater,container,false)
        return binding.root
    }

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

            binding.btnEnternet.setOnClickListener{
                val intetn = Intent(requireContext(), MainActivity::class.java)
                activity?.finish()
                startActivity(intetn)
            }

    }

    companion object {

        fun newInstance() = EnternetFragment()
    }
}