import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/*
 * Copyright (c) 2023-2025 Datalayer, Inc.
 * Distributed under the terms of the Modified BSD License.
 */
import { Heading, Text } from '@primer/react';
import { Box } from '@datalayer/primer-addons';
export const NbGradesDetails = (props) => {
    const { studentItem } = props;
    return studentItem && studentItem?.nbgrades ? (_jsxs(Box, { children: [_jsx(Box, { children: _jsx(Heading, { sx: { fontSize: 1 }, children: "Grades" }) }), _jsx(Box, { mt: 3, children: studentItem?.nbgrades.map(nb => {
                    return (_jsx(Box, { children: _jsxs(Text, { sx: { fontSize: 'small' }, children: [nb.grade_id_s, ": ", nb.score_f] }) }));
                }) }), _jsx(Box, { mt: 3, children: _jsx(Heading, { sx: { fontSize: 1 }, children: "Total" }) }), _jsxs(Box, { mt: 3, children: [studentItem?.nbgradesTotalScore, " / ", studentItem?.nbgradesTotalPoints] })] })) : (_jsxs(Box, { children: [_jsx(Box, { children: _jsx(Heading, { sx: { fontSize: 1 }, children: "Grades" }) }), _jsx(Box, { mt: 3, children: "Please grade your assignment." })] }));
};
export default NbGradesDetails;
