"use client";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
interface ConverterCardAmountInputProps {
amountInput: string;
amountPrefix?: string;
amountInputPaddingLeft?: string;
amountError: string | null;
quickAmounts: readonly number[];
activeQuickAmount: number | null;
onAmountChange: (nextValue: string) => void;
onQuickAmountSelect: (value: number) => void;
}
export function ConverterCardAmountInput({
amountInput,
amountPrefix,
amountInputPaddingLeft,
amountError,
quickAmounts,
activeQuickAmount,
onAmountChange,
onQuickAmountSelect,
}: ConverterCardAmountInputProps) {
return (
{amountPrefix ? (
{amountPrefix}
) : null}
onAmountChange(event.target.value)}
placeholder="Enter amount"
className="h-14 rounded-xl bg-background/70 px-4 text-lg"
style={amountInputPaddingLeft ? { paddingLeft: amountInputPaddingLeft } : undefined}
aria-invalid={Boolean(amountError)}
aria-describedby={amountError ? "amount-error" : undefined}
/>
{quickAmounts.map((quickAmount) => (
))}
{amountError ? (
{amountError}
) : null}
);
}