"use client"

import { useSearchParams } from "next/navigation"
import { useIntl } from "react-intl"

import Button from "@/components/TempDesignSystem/Button"

import styles from "./details.module.css"

import type { DetailsProps } from "@/types/components/hotelReservation/selectRate/section"

export default function Details({ nextPath }: DetailsProps) {
  const intl = useIntl()
  const searchParams = useSearchParams()

  return (
    <div className={styles.wrapper}>
      <form method="GET" action={`${nextPath}?${searchParams}`}>
        <Button type="submit">{intl.formatMessage({ id: "Submit" })}</Button>
      </form>
    </div>
  )
}
