'use client'; import React from 'react'; import { clsx } from 'clsx'; import { twMerge } from 'tailwind-merge'; export type InputVariant = 'default' | 'search'; export interface InputProps extends Omit, 'size'> { variant?: InputVariant; label?: string; error?: string; helperText?: string; className?: string; wrapperClassName?: string; } const SearchIcon: React.FC<{ className?: string }> = ({ className }) => ( ); export const Input = React.forwardRef( ( { variant = 'default', label, error, helperText, className, wrapperClassName, id, ...props }, ref, ) => { const inputId = id || label?.toLowerCase().replace(/\s+/g, '-'); const hasError = Boolean(error); return (
{label && ( )}
{variant === 'search' && (
)}
{hasError && ( )} {!hasError && helperText && (

{helperText}

)}
); }, ); Input.displayName = 'Input';