package com.swoosh.microblog.data.model

import androidx.compose.runtime.Immutable

@Immutable
data class GhostAccount(
    val id: String,
    val name: String,
    val blogUrl: String,
    val apiKey: String,
    val isActive: Boolean = false,
    val colorIndex: Int = 0,
    val avatarUrl: String? = null
) {
    companion object {
        val ACCOUNT_COLORS = listOf(
            0xFF6750A4, // Purple
            0xFF00796B, // Teal
            0xFFD32F2F, // Red
            0xFF1976D2, // Blue
            0xFFF57C00, // Orange
        )

        fun colorForIndex(index: Int): Long {
            return ACCOUNT_COLORS[index % ACCOUNT_COLORS.size]
        }
    }
}
