"use client"; import { createFileRoute, Link } from "@tanstack/react-router"; import { ArrowRight, CheckCircle2, Loader2, Sparkles } from "lucide-react"; import { useSubscription } from "@/hooks/use-profile"; import { useProfile } from "@/hooks/use-profile"; import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; import { SubscriptionBanner } from "@/components/mika/SubscriptionBanner"; import { cn } from "@/lib/utils"; export const Route = createFileRoute("/painel/")({ component: DashboardPage, }); function DashboardPage() { const { data: subscription, isLoading } = useSubscription(); const { data: profile } = useProfile(); if (isLoading) { return (
); } const firstName = (profile?.full_name || "").split(" ")[0] || "por aqui"; return (

Olá, {firstName} 👋

{subscription ? "Acompanhe abaixo o status do seu agente Mika." : "Vamos colocar seu agente Mika no ar."}

{!subscription && } {subscription && (subscription.status === "incomplete" || subscription.status === "active") && ( )}
); } function NoSubscriptionCard() { return (

Escolha um plano para começar

Em poucos minutos seu agente Mika estará disponível no Telegram, com memória persistente e skills personalizadas.

); } function ProvisioningCard() { const steps = [ { label: "Provisionar container na VPS", state: "active" as const }, { label: "Configurar modelo de IA", state: "pending" as const }, { label: "Conectar seu Telegram", state: "pending" as const }, { label: "Personalizar seu agente", state: "pending" as const }, ]; return (

Seu agente Mika está sendo provisionado

Você receberá um e-mail quando estiver pronto — geralmente em até 10 minutos.

    {steps.map((step, i) => (
  1. {step.state === "active" ? ( ) : step.state === "pending" ? ( i + 1 ) : ( )}

    {step.label}

  2. ))}
); }