import React, { useState } from 'react'; import { Box, Typography, Paper, Grid, Tooltip, Card, CardContent, Chip, Dialog, DialogTitle, DialogContent } from '@mui/material'; import { SocialClass, Character } from '../types/timeline'; const socialClasses: SocialClass[] = [ { name: 'Upper Class', description: 'The landed gentry and aristocracy of Regency England', incomeRange: '£4,000-10,000 per annum', modernEquivalent: '$200,000-500,000 per year', characteristics: [ 'Inherited estates and land', 'No need to work for income', 'Expected to maintain country estates', 'Social obligations to tenants and community' ], examples: [ { character: 'Mr. Darcy', novel: 'Pride and Prejudice', context: 'Owner of Pemberley estate with £10,000 per year' }, { character: 'Sir Thomas Bertram', novel: 'Mansfield Park', context: 'Owner of Mansfield Park and plantations in Antigua' } ] }, { name: 'Middle Class', description: 'Professional class including clergy, military officers, and successful merchants', incomeRange: '£200-1,000 per annum', modernEquivalent: '$30,000-150,000 per year', characteristics: [ 'Professional occupations', 'Education but no inherited wealth', 'Aspiring to climb social ladder', 'Emphasis on manners and propriety' ], examples: [ { character: 'Mr. Bennet', novel: 'Pride and Prejudice', context: 'Country gentleman with £2,000 per year' }, { character: 'Henry Tilney', novel: 'Northanger Abbey', context: 'Clergyman with independent means' } ] }, { name: 'Working Class', description: 'Servants, laborers, and small traders', incomeRange: '£20-100 per annum', modernEquivalent: '$5,000-20,000 per year', characteristics: [ 'Manual labor or service positions', 'Limited education and opportunities', 'Dependent on employers', 'Focus on survival and basic needs' ], examples: [ { character: 'The Hill Family', novel: 'Longbourn', context: 'Servants at the Bennet household' }, { character: 'Hannah', novel: 'Northanger Abbey', context: 'Servant at the Tilney household' } ] } ]; const characters: Character[] = [ { id: 'darcy', name: 'Mr. Darcy', novel: 'Pride and Prejudice', socialClass: 'upper', occupation: 'Landowner', annualIncome: '£10,000', modernEquivalent: '$500,000', description: 'Wealthy landowner of Pemberley estate', relationships: ['elizabeth-bennet', 'georgiana-darcy'] }, { id: 'elizabeth', name: 'Elizabeth Bennet', novel: 'Pride and Prejudice', socialClass: 'middle', occupation: 'Gentleman\'s daughter', annualIncome: 'Share of £2,000', modernEquivalent: '$10,000', description: 'Intelligent and witty second daughter of the Bennet family', relationships: ['darcy', 'jane-bennet'] }, { id: 'sarah', name: 'Sarah', novel: 'Longbourn', socialClass: 'working', occupation: 'Housemaid', annualIncome: '£8', modernEquivalent: '$2,000', description: 'Hardworking housemaid at Longbourn', relationships: ['mrs-hill', 'james-smith'] } ]; export default function SocialClassView() { const [selectedCharacter, setSelectedCharacter] = useState(null); const [comparisonCharacter, setComparisonCharacter] = useState(null); const [dialogOpen, setDialogOpen] = useState(false); const handleCharacterClick = (character: Character) => { if (!selectedCharacter) { setSelectedCharacter(character); } else if (selectedCharacter.id !== character.id) { setComparisonCharacter(character); setDialogOpen(true); } }; const handleCloseDialog = () => { setDialogOpen(false); setSelectedCharacter(null); setComparisonCharacter(null); }; return ( Social Class in Austen's Novels {/* Social Pyramid */} {socialClasses.map((socialClass, index) => ( {socialClass.name} {socialClass.description} Income: {socialClass.incomeRange} } arrow > {socialClass.name} ))} {/* Character Grid */} Character Examples {selectedCharacter && '(Select another character to compare)'} {characters.map((character) => ( handleCharacterClick(character)} sx={{ cursor: 'pointer', transition: 'all 0.2s', '&:hover': { transform: 'scale(1.02)', }, bgcolor: selectedCharacter?.id === character.id ? 'primary.50' : 'background.paper' }} > {character.name} {character.novel} Annual Income: {character.annualIncome} Modern Equivalent: {character.modernEquivalent} ))} {/* Comparison Dialog */} Character Comparison {selectedCharacter && comparisonCharacter && ( {selectedCharacter.name} Novel: {selectedCharacter.novel} Class: {selectedCharacter.socialClass} Income: {selectedCharacter.annualIncome} Modern: {selectedCharacter.modernEquivalent} {selectedCharacter.description} {comparisonCharacter.name} Novel: {comparisonCharacter.novel} Class: {comparisonCharacter.socialClass} Income: {comparisonCharacter.annualIncome} Modern: {comparisonCharacter.modernEquivalent} {comparisonCharacter.description} )} ); }