
import React from 'react';
import { FormField, FormItem, FormLabel } from '@/components/ui/form';
import { Input } from '@/components/ui/input';
import { UseFormReturn } from 'react-hook-form';
import { ExpenseFormValues } from './ExpenseForm';

interface ExpenseTitleInputProps {
  form: UseFormReturn<ExpenseFormValues>;
  isDisabled?: boolean;
}

const ExpenseTitleInput: React.FC<ExpenseTitleInputProps> = ({ 
  form,
  isDisabled = false
}) => {
  return (
    <FormField
      control={form.control}
      name="title"
      render={({ field }) => (
        <FormItem>
          <FormLabel>제목</FormLabel>
          <Input 
            placeholder="지출 내역을 입력하세요" 
            {...field} 
            disabled={isDisabled}
          />
        </FormItem>
      )}
    />
  );
};

export default ExpenseTitleInput;
