package app.furmeet.events.system.developer

import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.drawable.Drawable
import android.os.Bundle
import app.furmeet.events.system.TranslatableAppCompatActivity
import app.furmeet.events.system.TranslatableAppCompatActivityWithScheduleServiceWrapped
import app.furmeet.events.system.helper.KnownAssets
import app.furmeet.events.system.legal.SoftwareLicensesActivity
import app.furmeet.events.bff.databinding.ActivityDeveloperBinding


class DeveloperActivity : TranslatableAppCompatActivityWithScheduleServiceWrapped() {

    lateinit var binding: ActivityDeveloperBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityDeveloperBinding.inflate(layoutInflater)
        val view = binding.root
        setContentView(view)
        scheduleManager.convention.colorScheme?.primaryRegular?.let {
            window!!.statusBarColor = it
            binding.broughtBy.setBackgroundColor(it)
            binding.broughtByContainer.setBackgroundColor(it)
        }
        binding.dev1HeadShotImg.setImageDrawable(
            Drawable.createFromStream(
                assets.open(KnownAssets.dev1HeadShot),
                null
            )
        )
        binding.actionSoftwareLicenses.setOnClickListener {
            Intent(this, SoftwareLicensesActivity::class.java).apply {
                startActivity(this)
            }
        }
    }
}