"use server";

import { serverFetchBlob } from "@/app/utils/fetchUtil";
import { BASE_API_URL } from "@/config/api";
import { cache } from "react";

export const getMailTemplatePdfForStockInLine = cache(async (stockInLineId: number) => {
    console.log("stockInLineId", stockInLineId)
    return serverFetchBlob(`${BASE_API_URL}/mailTemplates/getMailTemplatePdfForStockInLine/${stockInLineId}`, 
    {
        method: "GET",
        headers: { "Content-Type": "application/json" },
        next: {
            tags: ["mailTemplateForStockInLine"],
        },
    })
})