//@flow import React from "react"; import { translate } from "react-i18next"; import type { Plugin } from "@scm-manager/ui-types"; import { Button, ButtonGroup, Checkbox, Modal, SubmitButton } from "@scm-manager/ui-components"; type Props = { plugin: Plugin, onSubmit: () => void, onClose: () => void, // context props t: string => string }; class PluginModal extends React.Component { renderDependencies() { const { plugin, t } = this.props; let dependencies = null; if (plugin.dependencies && plugin.dependencies.length > 0) { dependencies = ( <> {t("plugins.modal.dependency", {count: plugin.dependencies.length})} ); } return dependencies; } render() { const { onSubmit, onClose, t } = this.props; const body = ( <> {this.renderDependencies()} ); const footer = (