import { FormItem } from "/@/components/BasicForm";

export function createFormData(formItems: Array<FormItem>) {
  const formData: Record<string, any> = {};

  for (const item of formItems) {
    const isCheckBox = item.type === "checkbox";
    const isDatepicker = item.type === "date_picker";
    const isRange = item.type === "range";
    formData[item.field] = isCheckBox || isDatepicker || isRange ? [] : "";
  }

  return formData;
}
