import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from '@/shadcn/ui/dialog' import { teachers } from '@/shared/data/teachers' import { Lesson } from '@/shared/model/lesson' import Link from 'next/link' import { BiLink } from 'react-icons/bi' export function ResourcesDialog({ open, onClose, teacherName, resources, homework }: { open: boolean onClose: () => any teacherName?: string resources: Lesson['resources'] homework?: string }) { const teacherPronouns = teachers.find(t => t.name === teacherName)?.pronouns return ( !isOpen && onClose()}> Материалы к уроку {teacherName && ( {teacherName} { teacherPronouns === 'she' ? 'поделилась' : teacherPronouns === 'he' ? 'поделился' : teacherPronouns === 'bitch' ? '(тварь) поделилась' : 'поделилась(-ся)' } материалами к этому уроку. )}
{homework && homework.trim() && (
{homework}
)} {resources.map((resource, i) => )}
) } function Resource({ resource }: { resource: Lesson['resources'][number] }) { if(resource.type === 'link') { return (
{resource.title}
) } }