"use client"

import type { IFormProps } from "./Form.d"
import type { JSX } from "react"

import { forwardRef } from "react"

import classNames from "classnames"

import styles from "./Form.module.scss"

export const Form = forwardRef<HTMLFormElement, IFormProps>(
	({ className, children, ...props }, ref): JSX.Element => (
		<form ref={ref} className={classNames(styles.form, className)} {...props}>
			{children}
		</form>
	),
)

Form.displayName = "Form"
