package com.placeholder.sherpai2.ui.presentation

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Face
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.text.font.FontWeight

/**
 * FaceCachePromptDialog - Shows on app launch if face cache needs population
 *
 * Location: /ui/presentation/FaceCachePromptDialog.kt (same package as MainScreen)
 *
 * Used by: MainScreen to prompt user to populate face cache
 */
@Composable
fun FaceCachePromptDialog(
    unscannedPhotoCount: Int,
    onDismiss: () -> Unit,
    onScanNow: () -> Unit
) {
    AlertDialog(
        onDismissRequest = onDismiss,
        icon = {
            Icon(
                imageVector = Icons.Default.Face,
                contentDescription = null,
                tint = MaterialTheme.colorScheme.primary
            )
        },
        title = {
            Text(
                text = "Face Cache Needs Update",
                fontWeight = FontWeight.Bold
            )
        },
        text = {
            Text(
                text = "You have $unscannedPhotoCount photos that haven't been scanned for faces yet.\n\n" +
                        "Scanning is required for:\n" +
                        "• People Discovery\n" +
                        "• Face Recognition\n" +
                        "• Face Tagging\n\n" +
                        "This is a one-time scan and will run in the background."
            )
        },
        confirmButton = {
            Button(onClick = onScanNow) {
                Text("Scan Now")
            }
        },
        dismissButton = {
            TextButton(onClick = onDismiss) {
                Text("Later")
            }
        }
    )
}