import {
  OFFER_PRODUCT_DETAIL_FIELDS
} from "./chunk-XQUF3WIS.js";
import {
  productsQueryKeys
} from "./chunk-YAUGB4LD.js";
import "./chunk-A5DJIOHN.js";
import {
  queryClient
} from "./chunk-RHKRREUU.js";
import "./chunk-ZA2KFUFR.js";
import {
  sdk
} from "./chunk-DTGEFKK4.js";
import "./chunk-NBMM2TZK.js";

// src/pages/offers/[id]/loader.ts
import { getLinkQuery } from "@mercurjs/dashboard-shared";
var offerProductDetailQuery = (id) => {
  const query = getLinkQuery("offer", OFFER_PRODUCT_DETAIL_FIELDS);
  return {
    queryKey: productsQueryKeys.detail(id, query),
    queryFn: async () => sdk.vendor.products.$id.query({
      $id: id,
      ...query
    })
  };
};
var loader = async ({ params }) => {
  const id = params.id;
  return queryClient.ensureQueryData(offerProductDetailQuery(id));
};
export {
  loader
};
