'use client'

import { usePopupController } from '@/store/popupController'

import MemberInfomationPopup from '../popup/MemberInformationPopup'
import ZipCodePopup from '../popup/ZipCodePopup'
import Alert from './common/Alert'
import DoubleBtnAlert from './common/DoubleBtnAlert'
import SuitableDetailPopup from '../popup/SuitableDetailPopup'
import SurveySaleSubmitPopup from '../popup/SurveySaleSubmitPopup'

export default function PopupController() {
  const popupController = usePopupController()

  return (
    <>
      {popupController.memberInfomationPopup && <MemberInfomationPopup />}
      {popupController.zipCodePopup && <ZipCodePopup />}
      {popupController.suitableDetailPopup && <SuitableDetailPopup />}
      {popupController.surveySaleSubmitPopup && <SurveySaleSubmitPopup />}
      {popupController.alert && <Alert />}
      {popupController.alert2 && <DoubleBtnAlert />}
    </>
  )
}
