"use client"

import { FC, PropsWithChildren } from "react"
import { Inbox, Clapperboard } from "lucide-react"

interface EmptyStateProps {
  title: string
  description?: string
  icon?: React.ReactNode
  minHeight?: string
}

const EmptyState: FC<PropsWithChildren<EmptyStateProps>> = ({
  title,
  description,
  icon,
  children,
}) => {
  return (
    <div
      className="flex w-full items-center justify-center text-center text-muted-foreground px-4"
      style={{
        animation: "fadeIn 0.35s ease",
      }}
    >
      <div
        className="
          w-full max-w-sm
          flex flex-col items-center
          p-5 rounded-2xl
          border border-primary/20

          bg-paper-2
          bg-gradient-to-br
          from-paper-2
          via-line
          to-paper-2

          dark:from-ink
          dark:via-ink
          dark:to-ink

          shadow-sm
          transition-all duration-200
          hover:shadow-md hover:-translate-y-[1px]
        "
      >
        <div className="w-16 h-16 flex items-center justify-center rounded-full bg-background/60 text-primary shadow-sm">
          {icon || <Inbox className="w-8 h-8" />}
        </div>

        <div className="my-2">
          <h3 className="mb-2 font-semibold text-sm text-foreground">
            {title}
          </h3>

          {description && (
            <p className="text-xs mt-1 text-muted-foreground leading-relaxed">
              {description}
            </p>
          )}
        </div>

        {children && <div className="mt-2">{children}</div>}
      </div>

      <style>{`
        @keyframes fadeIn {
          from {opacity: 0; transform: translateY(8px);}
          to {opacity: 1; transform: translateY(0);}
        }
      `}</style>
    </div>
  )
}

export default EmptyState
