
import React from 'react';
import { FormField, FormItem, FormLabel, FormControl, FormMessage } from '@/components/ui/form';
import { Input } from '@/components/ui/input';
import { UseFormReturn } from 'react-hook-form';
import { TransactionFormValues } from './TransactionFormFields';

interface TransactionTitleInputProps {
  form: UseFormReturn<TransactionFormValues>;
}

const TransactionTitleInput: React.FC<TransactionTitleInputProps> = ({ form }) => {
  return (
    <FormField
      control={form.control}
      name="title"
      render={({ field }) => (
        <FormItem>
          <FormLabel>제목</FormLabel>
          <FormControl>
            <Input placeholder="제목을 입력하세요" {...field} />
          </FormControl>
          <FormMessage />
        </FormItem>
      )}
    />
  );
};

export default TransactionTitleInput;
