import React, { useState, useEffect, useCallback } from 'react'; function Section({ title, children }: { title: string; children: React.ReactNode }) { return (

{title}

{children}
); } const shimmerStyle: React.CSSProperties = { background: 'linear-gradient(90deg, var(--flux-grey-100) 25%, var(--flux-grey-50, #f9fafb) 50%, var(--flux-grey-100) 75%)', backgroundSize: '200% 100%', animation: 'shimmer 1.5s infinite', }; function Skeleton({ className }: { className: string }) { return
; } function KaptioMark({ size = 32 }: { size?: number }) { return ( ); } function SkeletonHeader() { return (
); } function LoadingState({ message, variant = 'document' }: { message: string; variant?: 'document' | 'payment' | 'preferences' }) { return (

{message}

{variant === 'document' && (
)} {variant === 'payment' && (
)} {variant === 'preferences' && (
{[1, 2, 3].map((i) => (
))}
)}
); } function ErrorState({ message, detail }: { message: string; detail: string }) { return (

{message}

{detail}

); } function ResolvedState() { return (

Ready

); } type DemoState = 'loading' | 'resolved' | 'error'; function InteractiveDemo() { const [state, setState] = useState('loading'); const cycle = useCallback(() => { setState('loading'); const t1 = setTimeout(() => setState('resolved'), 2500); const t2 = setTimeout(() => setState('loading'), 4500); return () => { clearTimeout(t1); clearTimeout(t2); }; }, []); useEffect(() => { const cleanup = cycle(); return cleanup; }, [cycle]); return (
{(['loading', 'resolved', 'error'] as const).map((s) => ( ))}
{state === 'loading' && } {state === 'resolved' && } {state === 'error' && ( )}
); } export default function FlowEntryDemo() { return (
); }