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

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

export default useSignUpStore;
