import React from "react" import BoxFull from "../base/BoxFull" import FormLabelled from "../base/FormLabelled" import FormLabel from "../base/formparts/FormLabel" import InputWithIcon from "../base/InputWithIcon" import { faBackward, faFolder, faPencilAlt, faPlus } from "@fortawesome/free-solid-svg-icons" import Radio from "../base/Radio" import Button from "../base/Button" import FormAlert from "../base/formparts/FormAlert" import useStrings from "../../hooks/useStrings" /** * A {@link BoxFull} allowing the user to save the changes made in the current {@link RepositoryEditor}. * * @param id - The id of the repository. * @param name - The current name of the repository. * @param setName - Function to change the name of the repository. * @param evaluationMode - The current evaluation mode of the repository. * @param setEvaluationMode - Function to change the current evaluation mode of the repository. * @param running - If a request is running, disabling the buttons. * @param error - If a request error occoured, the error. * @param revert - Function to cancel the changes made to the repository. * @param save - Function to apply the changes made to the repository. * @param props - Additional props to pass to the box. * @returns {JSX.Element} * @constructor */ export default function BoxRepositoryCreate( { id, name, setName, evaluationMode, setEvaluationMode, running, error, revert, save, ...props }) { const strings = useStrings() return ( { e.preventDefault() save() }} > setName(e.target.value)} />   {error ? {strings[error.data.code]} : null} {id ? <> : } ) }