import type { PersonRecord } from "@/services/dictionaryService";

export type PersonItem = PersonRecord;

export interface PersonFormValues {
  firstName: string;
  lastName: string;
  emailAddress: string;
  phoneNumber: string;
  instituteName: string;
}

export interface PersonPageState {
  rows: PersonItem[];
  form: PersonFormValues;
  loading: boolean;
  submitting: boolean;
  error: string | null;
}

export const emptyPersonForm: PersonFormValues = {
  firstName: "",
  lastName: "",
  emailAddress: "",
  phoneNumber: "",
  instituteName: "",
};

export const initialPersonState: PersonPageState = {
  rows: [],
  form: emptyPersonForm,
  loading: true,
  submitting: false,
  error: null,
};
