import type { classroom_v1 } from '@googleapis/classroom' import { View } from 'react-native' import { Card, Text } from 'react-native-paper' const COURSE_COLORS = [ 'bg-green-600', 'bg-blue-600', 'bg-yellow-500', 'bg-red-600', 'bg-pink-400', 'bg-gray-500', ] export default function CourseCard(course: classroom_v1.Schema$Course) { const { name, section, courseState, id } = course const colorIndex = parseInt(id || '0', 16) % COURSE_COLORS.length const bannerColor = COURSE_COLORS[colorIndex] return ( {name || 'Untitled Course'} {section && ( {section} )} {courseState && courseState !== 'ACTIVE' && ( {courseState} )} ) }