"use client";
import React from "react";

type Props = React.ButtonHTMLAttributes<HTMLButtonElement> & {
  variant?: "primary" | "secondary" | "ghost";
};

export function Button({ variant = "primary", style, ...props }: Props) {
  const base: React.CSSProperties = {
    padding: "8px 12px",
    borderRadius: 6,
    border: "1px solid transparent",
    cursor: "pointer",
  };
  const variants: Record<NonNullable<Props["variant"]>, React.CSSProperties> = {
    primary: { background: "#111", color: "#fff" },
    secondary: { background: "#eee", color: "#111" },
    ghost: { background: "transparent", borderColor: "#ddd", color: "#111" },
  };
  return <button {...props} style={{ ...base, ...variants[variant], ...(style ?? {}) }} />;
}


