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

const useSignUpStore = create<SignUpFormState>((set) => ({
    signUpFormData: {
        phone: '',
        nickName: '',
        gender: '',
        password: '',
        email: '',
        birthDate: '',
        isUberDriver: false,
        selectedCarModel: '',
        selectedCarBrand: '',
        selectedCarSeries:'',
        licensePlate: '',
        address: '',
        paymentMethod: ''
    },
    setSignUpFormData: (newFormData) =>
        set((state) => ({
            signUpFormData: {
                ...state.signUpFormData,
                ...newFormData
            }
        }))
}));

export default useSignUpStore;
