import React from "react";
import { Stepper, Step, StepItem } from "./stepper";
const DEFAULT_VIDEO_SRC =
"https://d1rndq5v7rs3ry.cloudfront.net/padua-landing-video.mp4";
// ---------------------------------------------------------------------------
// SignupVideoPanel
// ---------------------------------------------------------------------------
export interface SignupVideoPanelProps {
/** Defaults to WealthX CDN landing video. */
videoSrc?: string;
}
export function SignupVideoPanel({
videoSrc = DEFAULT_VIDEO_SRC,
}: SignupVideoPanelProps) {
return (
);
}
// ---------------------------------------------------------------------------
// SignupShell — backoffice signup wizard layout
// ---------------------------------------------------------------------------
export interface SignupShellProps {
/** Ordered list of step labels used by the stepper and h2 heading. */
steps: string[];
/** 0-based active step index. When >= steps.length the success layout is shown. */
step: number;
children: React.ReactNode;
/** Sticky footer content (Prev/Next buttons). Hidden in success state. */
footer?: React.ReactNode;
videoSrc?: string;
/** Page heading above the stepper. Defaults to "Sign Up". */
title?: string;
}
export function SignupShell({
steps,
step,
children,
footer,
videoSrc,
title = "Sign Up",
}: SignupShellProps) {
const isSuccess = step >= steps.length;
return (
{isSuccess ? (
{children}
) : (
<>
{title}
{steps.map((label) => (
))}
{steps[step]}
{children}
{footer && (
)}
>
)}
);
}
// ---------------------------------------------------------------------------
// FrontendShell — client-facing signup wizard layout
// ---------------------------------------------------------------------------
export interface FrontendShellProps {
/** Step labels for the stepper. Required when stepIndex is provided. */
steps?: string[];
/** 0-based active step. When undefined the stepper is hidden. */
stepIndex?: number;
children: React.ReactNode;
footer?: React.ReactNode;
/** When true renders a centered layout without stepper/title (success screen). */
isSuccess?: boolean;
videoSrc?: string;
/** Page heading. Defaults to "Create Account". */
title?: string;
}
export function FrontendShell({
steps,
stepIndex,
children,
footer,
isSuccess = false,
videoSrc,
title = "Create Account",
}: FrontendShellProps) {
const hasStepper = stepIndex !== undefined && steps !== undefined;
return (
{isSuccess ? (
{children}
) : (
<>
{title}
{hasStepper && (
{steps!.map((label) => (
))}
)}
{hasStepper && (
{steps![stepIndex!]}
)}
{children}
{footer && (
)}
>
)}
);
}