import {disablePlugin, enablePlugin} from 'sentry/actionCreators/plugins';
import InactivePlugins from 'sentry/components/inactivePlugins';
import PluginConfig from 'sentry/components/pluginConfig';
import {t} from 'sentry/locale';
import {Organization, Plugin, Project} from 'sentry/types';
import {Panel, PanelItem} from './panels';
type Props = {
organization: Organization;
pluginList: Plugin[];
project: Project;
onDisablePlugin?: (plugin: Plugin) => void;
onEnablePlugin?: (plugin: Plugin) => void;
};
const PluginList = ({
organization,
project,
pluginList,
onDisablePlugin = () => {},
onEnablePlugin = () => {},
}: Props) => {
const handleEnablePlugin = (plugin: Plugin) => {
enablePlugin({
projectId: project.slug,
orgId: organization.slug,
pluginId: plugin.slug,
});
onEnablePlugin(plugin);
};
const handleDisablePlugin = (plugin: Plugin) => {
disablePlugin({
projectId: project.slug,
orgId: organization.slug,
pluginId: plugin.slug,
});
onDisablePlugin(plugin);
};
if (!pluginList.length) {
return (