package com.tangem.features.send.subcomponents.destination.model.transformers

import com.tangem.features.send.api.subcomponents.destination.entity.DestinationRecipientListUM
import kotlinx.collections.immutable.toPersistentList

internal const val WALLET_DEFAULT_COUNT = 1
internal const val RECENT_DEFAULT_COUNT = 3
internal const val WALLET_KEY_TAG = "wallet"
internal const val RECENT_KEY_TAG = "recent"

internal fun loadingListState(tag: String, count: Int) = buildList {
    repeat(count) { i ->
        add(
            DestinationRecipientListUM(
                id = "$tag$i",
                isLoading = true,
            ),
        )
    }
}.toPersistentList()

internal fun emptyListState(tag: String, count: Int) = buildList {
    repeat(count) { i ->
        add(
            DestinationRecipientListUM(
                id = "$tag$i",
                isLoading = false,
                isVisible = false,
            ),
        )
    }
}.toPersistentList()