import React, { useState } from 'react'; import { AgeVerificationModal } from './AgeVerificationModal'; /** * Content Rating Toggle * * A prominent toggle switch in the header that controls SFW/Mature mode. * Switching to Mature requires age verification. */ export const ContentRatingToggle = ({ contentRating, onRatingChange, disabled = false, }) => { const [showVerification, setShowVerification] = useState(false); const isMature = contentRating === 'mature'; const handleToggle = () => { if (disabled) return; if (isMature) { // Switching back to SFW - no verification needed onRatingChange('sfw'); } else { // Switching to Mature - show verification setShowVerification(true); } }; const handleVerified = () => { setShowVerification(false); onRatingChange('mature'); }; return (<>