import * as React from "react";

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

const Input = React.forwardRef<
  HTMLInputElement,
  React.InputHTMLAttributes<HTMLInputElement>
>(({ className, type, ...props }, ref) => (
  <input
    ref={ref}
    type={type}
    className={cn(
      "app-input flex h-11 w-full rounded-xl border border-[color:var(--border)] [--input-bg:var(--surface)] [--input-text:var(--text)] bg-[color:var(--input-bg)] px-4 text-sm text-[color:var(--input-text)] shadow-sm placeholder:text-[color:var(--text-muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--accent)] disabled:cursor-not-allowed disabled:[--input-bg:var(--surface-muted)] disabled:[--input-text:var(--text-muted)]",
      className,
    )}
    {...props}
  />
));
Input.displayName = "Input";

export { Input };
