import { FormEvent as ReactFormEvent} from "react";

export interface ISubmitEvent<InputName extends string = string>
  extends ReactFormEvent<HTMLFormElement> {
  currentTarget: ReactFormEvent<HTMLFormElement>["currentTarget"] & {
    elements: IFormElements<InputName>;
  };
}

export type IFormElements<InputName extends string> =
  HTMLFormControlsCollection & Record<InputName, HTMLInputElement>;
