import {
  OFFER_VARIANT_DETAIL_FIELDS
} from "./chunk-XQUF3WIS.js";
import {
  offerQueryKeys
} from "./chunk-5DKUSZQ7.js";
import "./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]/variants/[offer_id]/loader.ts
import { getLinkQuery } from "@mercurjs/dashboard-shared";
var offerVariantDetailQuery = (offerId) => {
  const query = getLinkQuery("offer", OFFER_VARIANT_DETAIL_FIELDS);
  return {
    queryKey: offerQueryKeys.detail(offerId, query),
    queryFn: async () => sdk.vendor.offers.$id.query({
      $id: offerId,
      ...query
    })
  };
};
var loader = async ({ params }) => {
  const offerId = params.offer_id;
  return queryClient.ensureQueryData(offerVariantDetailQuery(offerId));
};
export {
  loader
};
