import { create } from 'zustand';

interface AddressState {
  selectedAddressId: number | null;
  setSelectedAddressId: (addressId: number | null) => void;
  clearSelectedAddress: () => void;
}

export const useAddressStore = create<AddressState>((set) => ({
  selectedAddressId: null,
  setSelectedAddressId: (addressId) => set({ selectedAddressId: addressId }),
  clearSelectedAddress: () => set({ selectedAddressId: null }),
}));