import type { NextPage } from "next";
import { ReceiptGenerator } from "~/components/acquisto_receipt";
import { LoadingPage } from "~/components/loading";
import type { OrdiniOrdineId } from "~/schemas/public/Ordini";
import { api } from "~/utils/api";

const Test: NextPage = () => {
  const { data } = api.servizio.getOrdineRicevutaData.useQuery({
    ordineId: "9e6badb3-41e7-459f-8e00-ae57bfb86ea0" as OrdiniOrdineId, // Replace with a valid ordine ID for testing
  });
  if (!data) {
    return <LoadingPage />;
  }
  return (
    <div className="mx-auto p-4">
      <ReceiptGenerator data={data} />
    </div>
  );
};

export default Test;
