"use client"
import { useIntl } from "react-intl"

import { DownloadIcon } from "@/components/Icons"
import Button from "@/components/TempDesignSystem/Button"

export default function DownloadInvoice() {
  const intl = useIntl()

  function downloadBooking() {
    window.print()
  }

  return (
    <Button
      intent="text"
      onPress={downloadBooking}
      size="small"
      theme="base"
      variant="icon"
      wrapping
    >
      <DownloadIcon />
      {intl.formatMessage({ id: "Download invoice" })}
    </Button>
  )
}
