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

export interface BomCombo {
    id: number;
    value: number;
    label: string;
}

export const preloadBomCombo = (() => {
    fetchBomCombo()
})

export const fetchBomCombo = cache(async () => {
    return serverFetchJson<BomCombo[]>(`${BASE_API_URL}/bom/combo`, {
        next: { tags: ["bomCombo"] },
    })
})


