import React from "react";
import { Edit, useForm } from "@refinedev/antd";
import { Form, Input } from "antd";
import { useTranslation } from "react-i18next";

export const ArticleEdit: React.FC = () => {
    const { t } = useTranslation();
    const { formProps, saveButtonProps } = useForm();

    return (
        <Edit saveButtonProps={saveButtonProps}>
            <Form {...formProps} layout="vertical">
                <Form.Item
                    label={t("article.title")}
                    name="Title"
                    rules={[{ required: true }]}
                >
                    <Input />
                </Form.Item>
                <Form.Item
                    label={t("article.content")}
                    name="Content"
                >
                    <Input.TextArea rows={6} />
                </Form.Item>
            </Form>
        </Edit>
    );
};
