"use client";

import { forwardRef } from "react";

import { ButtonProps } from "@shared/components/button/types";
import { cx } from "@shared/utils";

// Minimal button: styling is entirely up to the consumer via className
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
  ({ children, className = "", style, disabled, ...props }, ref) => {
    return (
      <button
        ref={ref}
        className={cx(className)}
        style={style}
        disabled={disabled}
        {...props}
      >
        {children}
      </button>
    );
  }
);

Button.displayName = "Button";

export type { ButtonProps };
