'use client' import type { FC } from 'react' import React, { useState } from 'react' import { InstallStep } from '../../types' import type { PluginDeclaration } from '../../types' import SelectPackage from './steps/select-package' export enum InstallType { fromLocal = 'fromLocal', fromMarketplace = 'fromMarketplace', fromDSL = 'fromDSL', } type Props = { installType?: InstallType plugins?: PluginDeclaration[] } const InstallBundle: FC = ({ installType = InstallType.fromMarketplace, plugins = [], }) => { const [step, setStep] = useState(installType === InstallType.fromMarketplace ? InstallStep.readyToInstall : InstallStep.uploading) const [selectedPlugins, setSelectedPlugins] = useState([]) const handleSelectedPluginsChange = (plugins: PluginDeclaration[]) => { setSelectedPlugins(plugins) } return (
{step === InstallStep.readyToInstall && ( )}
) } export default React.memo(InstallBundle)