'use client';

import React from 'react';
import { Form } from 'antd';
import { TagInput } from '@/components/tags/TagInput';
import type { FormItemProps } from 'antd';

interface FormTagInputProps extends FormItemProps {
    name: string | (string | number)[];
    placeholder?: string;
    maxTags?: number;
    colors?: string[];
}

export function FormTagInput({
    name,
    placeholder,
    maxTags,
    colors,
    ...formItemProps
}: FormTagInputProps) {
    return (
        <Form.Item name={name} {...formItemProps}>
            <TagInput placeholder={placeholder} maxTags={maxTags} colors={colors} />
        </Form.Item>
    );
}
