import * as React from "react";

import { cn } from "../lib/utils";

export interface TextareaProps
  extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}

const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
  ({ className, ...props }, ref) => {
    return (
      <textarea
        className={cn(
          "tw-figr-flex tw-figr-min-h-[80px] tw-figr-w-full tw-figr-border-collapse tw-figr-rounded-m tw-figr-border-neutral-200 tw-figr-bg-base-white tw-figr-px-sm tw-figr-py-s tw-figr-text-base-black tw-figr-ring-offset-background placeholder:tw-figr-text-neutral-700 focus-visible:tw-figr-outline-none focus-visible:tw-figr-ring-2 focus-visible:tw-figr-ring-primary focus-visible:tw-figr-ring-offset-2 focus-visible:tw-figr-ring-offset-primary disabled:tw-figr-cursor-not-allowed disabled:tw-figr-opacity-50",
          className
        )}
        placeholder="Type your message here."
        ref={ref}
        {...props}
      />
    );
  }
);
Textarea.displayName = "Textarea";

export { Textarea };
