import { create } from 'zustand';

interface VehicleState {
    vehicleBrand: string;
    BrandID: string;
    vehicleModel: string;
    ModelID: string;
    licensePlate: string;
    setVehicleBrand: (brand: string) => void;
    setBrandID: (id: string) => void;
    setVehicleModel: (model: string) => void;
    setModelID: (id: string) => void;
    setLicensePlate: (plate: string) => void;
}

// Create the store
const useVehicleStore = create<VehicleState>((set) => ({
    vehicleBrand: '',
    BrandID: '',
    vehicleModel: '',
    ModelID: '',
    licensePlate: '',

    setVehicleBrand: (brand: string) => set({ vehicleBrand: brand }),
    setBrandID: (id: string) => set({ BrandID: id }),
    setVehicleModel: (model: string) => set({ vehicleModel: model }),
    setModelID: (id: string) => set({ ModelID: id }),
    setLicensePlate: (plate: string) => set({ licensePlate: plate })
}));

export default useVehicleStore;
