36 lines
936 B
TypeScript
36 lines
936 B
TypeScript
import { WizardSteps } from "../ui/wizard";
|
|
import {
|
|
ADD_PROVIDER_WIZARD_STEPS,
|
|
resolveWizardNavigation,
|
|
type WizardNavigation,
|
|
} from "./AddProviderInstanceDialog.logic";
|
|
|
|
interface AddProviderInstanceWizardStepsProps {
|
|
readonly currentStep: number;
|
|
readonly summaries: readonly (string | null)[];
|
|
readonly instanceIdError: string | null;
|
|
readonly onNavigation: (navigation: WizardNavigation) => void;
|
|
}
|
|
|
|
export function AddProviderInstanceWizardSteps({
|
|
currentStep,
|
|
summaries,
|
|
instanceIdError,
|
|
onNavigation,
|
|
}: AddProviderInstanceWizardStepsProps) {
|
|
return (
|
|
<WizardSteps
|
|
steps={ADD_PROVIDER_WIZARD_STEPS}
|
|
currentStep={currentStep}
|
|
summaries={summaries}
|
|
onStepChange={(requestedStep) =>
|
|
onNavigation(
|
|
resolveWizardNavigation(currentStep, requestedStep, ADD_PROVIDER_WIZARD_STEPS.length, {
|
|
instanceIdError,
|
|
}),
|
|
)
|
|
}
|
|
/>
|
|
);
|
|
}
|