package com.pixelized.shared.lwa.utils

enum class OperatingSystem(
    val home: String = System.getProperty("user.home"),
) {
    Windows,
    Macintosh;

    companion object {
        val current: OperatingSystem = run {
            val name = System.getProperty("os.name")
            when {
                name.contains(other = "win", ignoreCase = true) -> Windows
                name.contains(other = "mac", ignoreCase = true) -> Macintosh
                else -> error("Unsupported operating system: $name")
            }
        }
    }
}