import { create } from 'zustand'

type AddressData = {
  post_code: string
  address: string
  address_detail: string
}

interface AddressState {
  addressData: AddressData | null
  setAddressData: (address: AddressData) => void
  resetAddressData: () => void
}

export const useAddressStore = create<AddressState>((set) => ({
  addressData: null,
  setAddressData: (address) => set({ addressData: address }),
  resetAddressData: () => set({ addressData: null }),
}))
