package com.tanya.careerguidanceproject.fragments

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import com.tanya.careerguidanceproject.R
import com.tanya.careerguidanceproject.activities.CareerList
//import com.tanya.careerguidanceproject.activities.CollegeList
import com.tanya.careerguidanceproject.activities.PreparationKit

class CollegeDashboardFragment : Fragment() {

    private lateinit var btnViewCareerOptions : Button
    private lateinit var btnPreparationKit : Button
    private lateinit var btnConsultExpert : Button

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment

        val view = inflater.inflate(R.layout.fragment_college_dashboard, container, false)

        btnViewCareerOptions = view.findViewById(R.id.btnCareerOptions)
        btnPreparationKit = view.findViewById(R.id.btnPreparationKit)
        btnConsultExpert = view.findViewById(R.id.btncConsultExpert)

        btnViewCareerOptions.setOnClickListener {
            val intent = Intent(activity, CareerList::class.java)
            startActivity(intent)
        }

        btnPreparationKit.setOnClickListener {
            val intent = Intent(activity, PreparationKit::class.java)
            startActivity(intent)
        }

        btnConsultExpert.setOnClickListener {
            val openURL = Intent(Intent.ACTION_VIEW)
            openURL.data = Uri.parse("https://www.expertrons.com/career-transformation-masterclass/")
            startActivity(openURL)
        }

        return view
    }
}