import type { ApiResponse } from "@/lib/api"
import type { ProductItem } from "@/lib/models/product"
import { callPublic } from "./base"

export async function fetchProducts(): Promise<ApiResponse<ProductItem[]>> {
  return await callPublic<ProductItem[]>(
    "/product/ApiProductActive",
    undefined,
    "GET",
  )
}

export async function fetchStaticProducts(): Promise<
  ApiResponse<ProductItem[]>
> {
  return await callPublic<ProductItem[]>(
    "/product/ApiProductStatic",
    undefined,
    "GET",
  )
}

export async function fetchWindowProducts(): Promise<
  ApiResponse<ProductItem[]>
> {
  return await callPublic<ProductItem[]>(
    "/product/ApiProductWindow",
    undefined,
    "GET",
  )
}
