package com.pixelized.biblib.ui.screen.home.common.preview

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.paging.PagingData
import com.pixelized.biblib.ui.screen.home.common.item.BookThumbnailUio
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf

@Composable
fun thumbnailPreviewResources(): Flow<PagingData<BookThumbnailUio>> {
    val thumbnails = remember {
        listOf(
            BookThumbnailUio(
                id = 112,
                title = "Prélude à Fondation",
                author = "Asimov",
                series = "Foundation",
                genre = "SCI-FI",
                isNew = false,
                language = "Français",
                date = "1988",
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/112.jpg",
            ),
            BookThumbnailUio(
                id = 78,
                title = "L'Aube de Fondation",
                series = "Foundation",
                genre = "SCI-FI",
                author = "Asimov",
                language = "Français",
                date = "1993",
                isNew = false,
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/78.jpg",
            ),
            BookThumbnailUio(
                id = 90,
                title = "Fondation",
                series = "Foundation",
                genre = "SCI-FI",
                author = "Asimov",
                language = "Français",
                date = "1951",
                isNew = false,
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/90.jpg",
            ),
            BookThumbnailUio(
                id = 184,
                title = "Fondation et Empire",
                series = "Foundation",
                genre = "SCI-FI",
                author = "Asimov",
                language = "Français",
                date = "1952",
                isNew = false,
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/184.jpg",
            ),
            BookThumbnailUio(
                id = 185,
                title = "Seconde Fondation",
                series = "Foundation",
                genre = "SCI-FI",
                author = "Asimov",
                language = "Français",
                date = "1953",
                isNew = false,
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/185.jpg",
            ),
            BookThumbnailUio(
                id = 119,
                title = "Fondation foudroyée",
                series = "Foundation",
                genre = "SCI-FI",
                author = "Asimov",
                language = "Français",
                date = "1982",
                isNew = false,
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/119.jpg",
            ),
            BookThumbnailUio(
                id = 163,
                title = "Terre et Fondation",
                series = "Foundation",
                genre = "SCI-FI",
                author = "Asimov",
                language = "Français",
                date = "1986",
                isNew = true,
                cover = "https://bib.bibulle.fr/api/book/cover/90.jpg",
                thumbnail = "https://bib.bibulle.fr/api/book/thumbnail/163.jpg",
            ),
        )
    }
    return flowOf(PagingData.from(thumbnails))
}