import { FileUpload, FormControl, FormField, FormItem, FormLabel, FormMessage, SelectBox } from "@common/business_components"; import { DatePicker } from "@common/components"; import { Input } from "@common/components"; export type typeOfForm ={ labelName: string; type: string; placeholder:any; formName: string; selectValue:selectValue|undefined; } type onSelectValue = (val:string) => void; export type selectValue ={ label:string, value:{ text: string; val: string }[], fun:onSelectValue } export function IteraterFrom(formData:typeOfForm[],form:any , formClass:string ){ const formItem =(data:typeOfForm,field:any)=>{ let tag if(data.type==='select'){ tag= (data.selectValue ? {...form} : null) }else if(data.type==='date'){ tag =() }else{ tag=() } return tag; } return ( <> {formData.map((data: typeOfForm, index) => ( ( {data.labelName} {formItem(data,field)} )} /> ))} ); };