package dev.stave.ui.search
import androidx.activity.compose.BackHandler
import androidx.compose.runtime.Composable
import dev.stave.ui.components.SystemImeTextDialog
// Maintainer, 2026-10-29: KDoc corrected — it called this page dead code;
// it is the live Servers → Search page.
/**
* Standalone search screen.
*
* Live: this is the Servers screen's Search page (its header Search
* action navigates to [dev.stave.ui.nav.Destinations.SEARCH]). Browse has
* its own inline search and does not come here.
*
* Renders the custom [SystemImeTextDialog]; the previous BasicTextField
* implementation summoned the system IME on Android TV and broke the
* app's text-entry consistency.
*/
@Composable
fun SearchScreen(
onSubmit: (query: String) -> Unit,
onBack: () -> Unit,
) {
BackHandler(onBack = onBack)
SystemImeTextDialog(
title = "Search",
subtitle = "Title, artist, or album — partial matches work.",
placeholder = "Start typing…",
confirmLabel = "search",
onConfirm = onSubmit,
onDismiss = onBack,
)
}