import { FC, isValidElement } from "react"; import { FMLocal, FieldLocal, FieldProp } from "../typings"; import { FieldLoading } from "./raw/FieldLoading"; import { MultiOption } from "./type/TypeMultiOption"; import { SingleOption } from "./type/TypeSingleOption"; import { FieldTypeText, PropTypeText } from "./type/TypeText"; const modify = { timeout: null as any, }; export const FieldInput: FC<{ field: FieldLocal; fm: FMLocal; PassProp: any; child: any; _item: PrasiItem; arg: FieldProp; }> = ({ field, fm, arg }) => { // return <>> const prefix = typeof field.prefix === "function" ? field.prefix() : typeof field.prefix === "string" ? field.prefix : null; const suffix = typeof field.suffix === "function" ? field.suffix() : typeof field.suffix === "string" ? field.prefix : null; const name = field.name; const errors = fm.error.get(name); let type_field = typeof arg.type === 'function' ? arg.type() : arg.type; // tipe field return (