import html from '../utils/html.js' import markdown from '../utils/markdown.js' import Duration from './duration.js' import Link from './link.js' /** * @param {import('../schema.d.ts').ResumeSchema['education']} education * @returns {string | false} */ export default function Education(education = []) { return ( education.length > 0 && html`

Education

${education.map( ({ area, courses = [], institution, startDate, endDate, studyType, url }) => html`

${Link(url, institution)}

${area && html`${area}`} ${startDate && html`
${Duration(startDate, endDate)}
`}
${studyType && markdown(studyType)} ${courses.length > 0 && html`
Courses
    ${courses.map(course => html`
  • ${markdown(course)}
  • `)}
`}
`, )}
` ) }