import { create } from 'zustand' type MemberInfomationPopupState = { memberInfomationPopup: boolean } type ZipCodePopupState = { zipCodePopup: boolean } type PoupControllerState = { memberInfomationPopup: boolean zipCodePopup: boolean setMemberInfomationPopup: (MemberInfomationPopupState: MemberInfomationPopupState) => void setZipCodePopup: (ZipCodePopupState: ZipCodePopupState) => void } type InitialState = { memberInfomationPopup: boolean zipCodePopup: boolean } const initialState: InitialState = { memberInfomationPopup: false, zipCodePopup: false, } export const usePopupController = create((set) => ({ ...initialState, setMemberInfomationPopup: ({ memberInfomationPopup }) => set((state) => ({ ...state, memberInfomationPopup })), setZipCodePopup: ({ zipCodePopup }) => set((state) => ({ ...state, zipCodePopup })), reset: () => set(initialState), }))