"use client";

import React from "react";
import Link from "next/link";
import { Sparkles } from "lucide-react";
import { cn } from "@/lib/utils";

interface LogoProps {
  variant?: "light" | "dark";
  className?: string;
  linkTo?: string;
}

export default function Logo({ variant = "light", className, linkTo = "/dashboard" }: LogoProps) {
  const textColor = variant === "light" ? "text-white" : "text-gray-900";
  const iconColor = variant === "light" ? "text-white/80" : "text-[#5146E5]";

  const content = (
    <div className={cn("flex items-center gap-2 py-2", className)}>
      <div className={cn("w-8 h-8 rounded-lg flex items-center justify-center", variant === "light" ? "bg-white/15" : "bg-[#5146E5]/10")}>
        <Sparkles className={cn("w-5 h-5", iconColor)} />
      </div>
      <div className="flex flex-col leading-tight">
        <span className={cn("text-sm font-bold tracking-tight font-inter", textColor)}>
          Oliver DeckForge
        </span>
        <span className={cn("text-[10px] font-inter", variant === "light" ? "text-white/60" : "text-gray-400")}>
          AI Presentations
        </span>
      </div>
    </div>
  );

  if (linkTo) {
    return <Link href={linkTo}>{content}</Link>;
  }

  return content;
}
