import React, { ComponentProps } from "react";
import { cn } from "@/lib/utils";
import {
  btnDefault,
  btnPrimary,
  btnFilterChipActive,
} from "@/lib/ui/buttonStyles";

type ButtonVariant = "default" | "primary" | "selected";

type TButton = ComponentProps<"button"> & {
  variant?: ButtonVariant;
};

function RoundedButton({
  children,
  style,
  className,
  variant = "default",
  ...rest
}: TButton) {
  return (
    <button
      className={cn(
        "max-w-[300px] text-center",
        variant === "primary" && btnPrimary,
        variant === "selected" && btnFilterChipActive,
        variant === "default" && btnDefault,
        className
      )}
      style={{ ...style }}
      {...rest}
    >
      {children}
    </button>
  );
}

export default RoundedButton;
