package eu.gaudian.translator.view.hints

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavController
import eu.gaudian.translator.view.composable.AppScaffold
import eu.gaudian.translator.view.composable.AppTopAppBar

/**
 * Generic hint screen wrapper that provides a consistent layout for all hint screens
 * with a top app bar and back navigation.
 */
@Composable
fun HintScreen(
    navController: NavController,
    title: String,
    content: @Composable () -> Unit
) {
    AppScaffold(
        topBar = {
            AppTopAppBar(
                title = title,
                onNavigateBack = { navController.popBackStack() }
            )
        }
    ) { paddingValues ->
        Column(
            modifier = Modifier
                .fillMaxSize()
                .padding(paddingValues)
                .verticalScroll(rememberScrollState())
        ) {
            content()
        }
    }
}