package com.example.randomtaskmobile

import GlobalSharedPreferences
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.randomtaskmobile.databinding.ActivityStartBinding



class StartActivity : AppCompatActivity() {
    private  lateinit var shPref: GlobalSharedPreferences
    private lateinit var binding: ActivityStartBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityStartBinding.inflate(layoutInflater)
        setContentView(binding.root)
        shPref = GlobalSharedPreferences(this)
        listener()
    }

    private fun listener()
    {
        binding.generateButtonOnStart.setOnClickListener {
            var intent = Intent(this@StartActivity, GenerateTaskActivity::class.java)
            intent.putExtra("work", "create")
            startActivity(intent)
        }

        binding.skipButton.setOnClickListener {
            startActivity(Intent(this@StartActivity, ListTaskActivity::class.java))
            finish()
        }
    }
}