'use client' import { useState } from 'react' import { toast } from 'sonner' import { ListChecks } from 'lucide-react' import { createOnboardingStep, updateOnboardingStep, deleteOnboardingStep } from '@/lib/actions' import { Card } from './card' import { useConfirm } from '@/components/ui/confirm' import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription } from '@/components/ui/empty' import type { Step, FormOption } from './types' export function OnboardingPanel({ isAdmin, steps: initial, forms, }: { isAdmin: boolean steps: Step[] forms: FormOption[] }) { const confirm = useConfirm() const [steps, setSteps] = useState(initial) const publishedForms = forms.filter(f => f.status === 'published') return ( ) : undefined} > {steps.length === 0 && ( No steps yet Add steps that run, in order, the first time a new member opens the app. )}