import { Form, Input, Button, Card, message } from 'antd';

const Settings = () => {
  const [form] = Form.useForm();

  const onFinish = (values) => {
    console.log('Success:', values);
    message.success('Settings updated successfully');
  };

  return (
    <Card title="Settings">
      <Form
        form={form}
        layout="vertical"
        onFinish={onFinish}
        initialValues={{
          email: 'john@example.com',
          notifications: true,
        }}
      >
        <Form.Item
          label="Email"
          name="email"
          rules={[{ required: true, type: 'email' }]}
        >
          <Input />
        </Form.Item>

        <Form.Item>
          <Button type="primary" htmlType="submit">
            Save Changes
          </Button>
        </Form.Item>
      </Form>
    </Card>
  );
};

export default Settings;