import { create } from "zustand";
import { SignUpFormState } from "../types/signUpFormData";

const useSignUpStore = create<SignUpFormState>((set) => ({
	signUpFormData: {
		phone: "",
		phoneVerificationStatus: false,
		name: "",
		password: "",
		email: "",
		birthDate: "",
		isUberDriver: undefined,
		vehicleType: "",
		vehicleModel: "",
		licensePlate: "",
		address: "",
		paymentMethod: "",
	},
	setSignUpFormData: (newFormData) =>
		set((state) => ({
			signUpFormData: {
				...state.signUpFormData,
				...newFormData,
			},
		})),
}));

export default useSignUpStore;
