import {
  ProductDetailPage
} from "./chunk-LBXPX3XC.js";
import "./chunk-4GPAS5GW.js";
import "./chunk-U2EI2ZLM.js";
import "./chunk-W6Y3PPU5.js";
import "./chunk-33XUAKRP.js";
import "./chunk-QOQSXNEF.js";
import "./chunk-FI474ADU.js";
import "./chunk-3XPXUIK3.js";
import "./chunk-JRTZWK77.js";
import {
  PRODUCT_DETAIL_QUERY
} from "./chunk-35NDMIYZ.js";
import "./chunk-E74OUNA3.js";
import "./chunk-H6MYB7GB.js";
import "./chunk-54RTJBYO.js";
import "./chunk-OB4NOV4M.js";
import "./chunk-INNFZYX2.js";
import "./chunk-BDGZ4EQO.js";
import "./chunk-LAVHRER2.js";
import "./chunk-Y7QKP6QU.js";
import "./chunk-THHRRYRS.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 {
  productsQueryKeys,
  useProduct
} 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/products/product-detail/breadcrumb.tsx
import { jsx } from "react/jsx-runtime";
var ProductDetailBreadcrumb = (props) => {
  const { id } = props.params || {};
  const { product } = useProduct(
    id,
    PRODUCT_DETAIL_QUERY,
    {
      initialData: props.data,
      enabled: Boolean(id)
    }
  );
  if (!product) {
    return null;
  }
  return /* @__PURE__ */ jsx("span", { children: product.title });
};

// src/pages/products/product-detail/loader.ts
var productDetailQuery = (id) => ({
  queryKey: productsQueryKeys.detail(id, PRODUCT_DETAIL_QUERY),
  queryFn: async () => sdk.admin.products.$id.query({ $id: id, ...PRODUCT_DETAIL_QUERY })
});
var productLoader = async ({ params }) => {
  const id = params.id;
  const query = productDetailQuery(id);
  const response = await queryClient.ensureQueryData({
    ...query,
    staleTime: 9e4
  });
  return response;
};
export {
  ProductDetailBreadcrumb as Breadcrumb,
  ProductDetailPage as Component,
  productLoader as loader
};
