import React from 'react'; import { Copy } from 'lucide-react'; import { Label } from './Label'; export interface InputProps extends React.InputHTMLAttributes { label?: string; error?: string; helperText?: string; onCopyClick?: () => void; copyLabel?: string; rightElement?: React.ReactNode; labelRightElement?: React.ReactNode; options?: { value: string; label: string }[]; } export const Input: React.FC = ({ label, error, helperText, className = '', id, onCopyClick, copyLabel, rightElement, labelRightElement, options, ...props }) => { const inputId = id || `input-${Date.now()}`; return (
{label && (
{labelRightElement && (
{labelRightElement}
)}
)}
{props.type === 'select' ? ( ) : ( )} {onCopyClick && !rightElement && ( )} {rightElement && (
{rightElement}
)}
{error &&

{error}

} {!error && helperText &&

{helperText}

}
); };