import {
  ProductVariantDetailPage
} from "./chunk-OG4WH7IW.js";
import "./chunk-PXYDR7WQ.js";
import "./chunk-7AV5EJJ5.js";
import {
  VARIANT_DETAIL_FIELDS
} from "./chunk-WCEMRNW4.js";
import "./chunk-QOQSXNEF.js";
import "./chunk-FI474ADU.js";
import "./chunk-3XPXUIK3.js";
import "./chunk-PHOCVOZ5.js";
import "./chunk-E74OUNA3.js";
import "./chunk-FQERBIVS.js";
import "./chunk-KYPPQGGE.js";
import "./chunk-ZMC7BKLT.js";
import "./chunk-KAZ5BYTQ.js";
import "./chunk-634XVU3D.js";
import "./chunk-H6MYB7GB.js";
import "./chunk-IQPN4PZJ.js";
import "./chunk-INNFZYX2.js";
import "./chunk-BDGZ4EQO.js";
import "./chunk-LAVHRER2.js";
import "./chunk-Y7QKP6QU.js";
import "./chunk-HKDFWQ6Q.js";
import "./chunk-SESTTUVM.js";
import "./chunk-UZWFZMOX.js";
import "./chunk-XQNVC4Q7.js";
import "./chunk-PBQ5M44A.js";
import "./chunk-OH4AABUT.js";
import "./chunk-YKDEE7ZL.js";
import "./chunk-AEMDNTW5.js";
import "./chunk-LYD3C73Z.js";
import "./chunk-7O5NDICV.js";
import "./chunk-46M463BR.js";
import "./chunk-YFRC6GEN.js";
import "./chunk-N6SI4IIT.js";
import "./chunk-JPNPTILP.js";
import "./chunk-DAXXLQKB.js";
import "./chunk-OHOWEMHO.js";
import "./chunk-GKGLVDDV.js";
import "./chunk-WJJXUXSO.js";
import "./chunk-LAPEZATU.js";
import "./chunk-DBNPVU3L.js";
import "./chunk-U7WZYWGA.js";
import "./chunk-ZN7LWXVC.js";
import "./chunk-VYMODH6P.js";
import "./chunk-LEG67A2R.js";
import "./chunk-PRBE5CM3.js";
import "./chunk-5TRY5IMZ.js";
import "./chunk-TAKEQAZZ.js";
import "./chunk-B6FG7A6W.js";
import "./chunk-EPHVGD5Z.js";
import "./chunk-ESPLVOFC.js";
import "./chunk-FXWKGNRV.js";
import "./chunk-VDKOJ5WD.js";
import "./chunk-DL2ZIXBO.js";
import "./chunk-Z2QQZOG3.js";
import {
  useProductVariant,
  variantsQueryKeys
} from "./chunk-5CK6XEFV.js";
import {
  queryClient
} from "./chunk-RHKRREUU.js";
import "./chunk-ZA2KFUFR.js";
import {
  sdk
} from "./chunk-ZBWL72TB.js";
import "./chunk-NBMM2TZK.js";

// src/pages/product-variants/product-variant-detail/breadcrumb.tsx
import { jsx } from "react/jsx-runtime";
var ProductVariantDetailBreadcrumb = (props) => {
  const { id, variant_id } = props.params || {};
  const { variant } = useProductVariant(
    id,
    variant_id,
    {
      fields: VARIANT_DETAIL_FIELDS
    },
    {
      initialData: props.data,
      enabled: Boolean(id) && Boolean(variant_id)
    }
  );
  if (!variant) {
    return null;
  }
  return /* @__PURE__ */ jsx("span", { children: variant.title });
};

// src/pages/product-variants/product-variant-detail/loader.ts
var variantDetailQuery = (productId, variantId) => ({
  queryKey: variantsQueryKeys.detail(variantId, {
    fields: VARIANT_DETAIL_FIELDS
  }),
  queryFn: async () => sdk.admin.products.$id.variants.$variantId.query({
    $id: productId,
    $variantId: variantId,
    fields: VARIANT_DETAIL_FIELDS
  })
});
var variantLoader = async ({ params }) => {
  const productId = params.id;
  const variantId = params.variant_id;
  const query = variantDetailQuery(productId, variantId);
  return queryClient.ensureQueryData(query);
};
export {
  ProductVariantDetailBreadcrumb as Breadcrumb,
  ProductVariantDetailPage as Component,
  variantLoader as loader
};
