/*
 * Book's Story — free and open-source Material You eBook reader.
 * Copyright (C) 2024-2026 Acclorite
 * SPDX-License-Identifier: GPL-3.0-only
 */

package org.dueattendant149.bookshelf.domain.use_case.remote

import org.dueattendant149.bookshelf.domain.model.library.Book
import org.dueattendant149.bookshelf.domain.repository.RemoteLibraryRepository
import javax.inject.Inject

class SearchBooksUseCase
    @Inject
    constructor(
        private val repository: RemoteLibraryRepository,
    ) {
        suspend operator fun invoke(
            libraryId: String,
            query: String,
        ): Result<List<Book>> = repository.searchLibrary(libraryId, query)
    }
