'use client'

import { useRouter } from 'next/navigation'
import { usePopupController } from '@/store/popupController'

export default function SuitableDetailPopupButton() {
  const popupController = usePopupController()
  const router = useRouter()

  return (
    <div className="btn-flex-wrap com">
      <div className="btn-bx">
        <button className="btn-frame n-blue icon" onClick={() => popupController.setSuitableDetailPopup(false)}>
          閉じる<i className="btn-arr"></i>
        </button>
      </div>
      <div className="btn-bx">
        <button className="btn-frame red icon">
          ウンロード<i className="btn-arr"></i>
        </button>
      </div>
      <div className="btn-bx">
        <button
          className="btn-frame n-blue icon"
          onClick={async () => {
            await popupController.setSuitableDetailPopup(false)
            router.push('/inquiry/regist')
          }}
        >
          1：1お問い合わせ<i className="btn-arr"></i>
        </button>
      </div>
    </div>
  )
}
