package com.tanya.careerguidanceproject.activities

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
//import com.tanya.careerguidanceproject.CollegeRecyclerAdapter
import com.tanya.careerguidanceproject.ExamRecyclerAdapter
import com.tanya.careerguidanceproject.R
//import com.tanya.careerguidanceproject.model.College
import com.tanya.careerguidanceproject.model.Exam

class ExamsList : AppCompatActivity() {

    private lateinit var recyclerDashboard : RecyclerView
    private lateinit var recyclerAdapter : ExamRecyclerAdapter

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_exams_list)

        val examInfoList = arrayListOf(
            Exam("Jee Mains","10+2 PCM","https://jeemain.nta.nic.in/webinfo2021/Page/Page?PageId=1&LangId=P"),
            Exam("BITSAT","10+2 PCM","https://www.bitsadmission.com/"),
            Exam("VITEEE","10+2 PCM","https://vit.ac.in/"),
            Exam("AIIMS","10+2 All","https://www.aiimsexams.org/info/Course.html"),
            Exam("NEET","10+2 PCB","https://ntaneet.nic.in/Ntaneet/Welcome.aspx"),
            Exam("Indian Navy B.Tech Entry Scheme","10+2 All","https://www.joinindiannavy.gov.in/"),
            Exam("National Institute Of Fashion Technology (NIFT) Entrance Test","10+2 All","http://www.nift.ac.in/"),
            Exam("Banaras Hindu University","10+2 SSocial Sciences","http://bhuonline.in/"),
            Exam("UPSEE","10+2 PCM","https://upsee.nic.in/publicinfo/public/home.aspx"),
            Exam("JEE Advanced","10+2 PCM","http://jeeadv.iitd.ac.in/"),

        )

        recyclerDashboard = findViewById(R.id.exam_list_view)

        // on below line passing our array lost to our adapter class.
        recyclerAdapter = ExamRecyclerAdapter(this@ExamsList, examInfoList)
        recyclerDashboard = findViewById(R.id.exam_list_view)

        // setting layout manager for our recycler view.
        val linearLayoutManager =
            LinearLayoutManager(this@ExamsList, RecyclerView.VERTICAL, false)
        recyclerDashboard.layoutManager = linearLayoutManager

        // setting our adapter to recycler view.
        recyclerDashboard.adapter = recyclerAdapter


    }
}