import {
Box,
Button,
Typography,
useTheme,
useMediaQuery,
Tooltip,
CircularProgress,
} from "@mui/material";
import { motion } from "framer-motion";
import { useNavigate } from "react-router-dom";
import { useSoundSystem } from "../contexts/SoundContext";
import {
ServiceStatusProvider,
useServiceStatus,
} from "../contexts/ServiceStatusContext";
import { BlinkingText } from "../components/BlinkingText";
import { BookPages } from "../components/BookPages";
import { ServiceStatus } from "../components/ServiceStatus";
function HomeContent() {
const navigate = useNavigate();
const { playSound } = useSoundSystem();
const { services, areServicesHealthy } = useServiceStatus();
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
// Vérifier si les services sont en cours de chargement
const isLoading = Object.values(services).some(
(service) => service.status === "loading"
);
const handlePlay = () => {
playSound("page");
navigate("/tutorial");
};
const playButton = (
Play
{isLoading && (
)}
);
return (
interactive
comic book
IA driven{" "}
Experience a unique comic book where artificial intelligence brings
your choices to life, shaping the narrative as you explore.
{isLoading || !areServicesHealthy() ? (
{playButton}
) : (
playButton
)}
);
}
export function Home() {
return (
);
}