import { FC, ReactNode } from "react"; //#region src/providers/StepperProvider.d.ts interface SubStep { title: string; description?: string; } interface CommonStep { label: string; title?: string; description?: string; /** Optional content shown when hovering the step item. */ tooltip?: ReactNode; } interface StepWithSubSteps extends CommonStep { subSteps: SubStep[]; } interface StepWithoutSubSteps extends CommonStep { subSteps?: undefined; } type Step = StepWithSubSteps | StepWithoutSubSteps; interface StepperContextType { steps: Step[]; currentStep: number; currentSubStep: number; setCurrentStep: (value: number) => void; goToNextStep: () => void; goToPreviousStep: () => void; isStepAtIndexDisabled: (stepIndex: number) => boolean; } declare function useStepper(): StepperContextType; interface StepperProviderProps { steps: Step[]; children: ReactNode; isStepDisabled?: ({ step, stepIndex, currentStep, currentStepIndex }: { step: Step; stepIndex: number; currentStep: Step; currentStepIndex: number; }) => boolean; } interface StepperProviderSyncedToURLParamProps extends StepperProviderProps { syncToURLParam: true; } interface StepperProviderWithoutSyncToURLParamProps extends StepperProviderProps { syncToURLParam?: undefined; initialStep?: number; } /** * @param steps - Which steps the stepper should have * @param syncToURLParam - Assumes step param is at end of path, syncs current step to the URL param * @param initialStep - Initial step to start the stepper at, can't be set if you use syncToURLParam */ declare const StepperProvider: FC; //#endregion export { StepperProvider, useStepper };