import {
  StoreDetailPage
} from "./chunk-GPKTJXGG.js";
import "./chunk-DBYUB2YI.js";
import "./chunk-NOWUEJ74.js";
import "./chunk-TZSOL34K.js";
import "./chunk-25LYVP3C.js";
import "./chunk-2Y3WMGN6.js";
import "./chunk-PXYDR7WQ.js";
import "./chunk-U2EI2ZLM.js";
import "./chunk-Z5I2Z6L3.js";
import "./chunk-FWPGOIFA.js";
import "./chunk-DB6ANJBO.js";
import "./chunk-PHOCVOZ5.js";
import "./chunk-E74OUNA3.js";
import "./chunk-WIYFXWRI.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-MDABSESI.js";
import "./chunk-INNFZYX2.js";
import "./chunk-BDGZ4EQO.js";
import "./chunk-LAVHRER2.js";
import "./chunk-Y7QKP6QU.js";
import "./chunk-VIGX66F7.js";
import "./chunk-HO7Z6MC3.js";
import "./chunk-MG4GKUJW.js";
import "./chunk-AYVH6Q5O.js";
import "./chunk-VOHEQ7B5.js";
import "./chunk-C3WE6EFO.js";
import "./chunk-N5IUYCUZ.js";
import "./chunk-7SVLKK6Q.js";
import "./chunk-GR6JUIRU.js";
import "./chunk-ZZO3INVE.js";
import "./chunk-PVZBDWLK.js";
import "./chunk-3B6MTW5G.js";
import "./chunk-VKOE5J66.js";
import "./chunk-DY3XQPHC.js";
import "./chunk-LNAXUDW2.js";
import "./chunk-VVWB3GIK.js";
import "./chunk-HKDFWQ6Q.js";
import "./chunk-SESTTUVM.js";
import "./chunk-THHRRYRS.js";
import "./chunk-UZWFZMOX.js";
import "./chunk-XQNVC4Q7.js";
import {
  subscriptionPlansQueryKeys
} from "./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 {
  sellersQueryKeys,
  useSeller
} from "./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 "./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/stores/store-details/breadcrumb.tsx
import { jsx } from "react/jsx-runtime";
var StoreDetailBreadcrumb = (props) => {
  const { id } = props.params || {};
  const { seller } = useSeller(id, void 0, {
    enabled: Boolean(id)
  });
  if (!seller) {
    return null;
  }
  return /* @__PURE__ */ jsx("span", { children: seller.name || seller.email });
};

// src/pages/stores/store-details/loader.ts
var sellerDetailQuery = (id) => ({
  queryKey: sellersQueryKeys.detail(id),
  queryFn: async () => sdk.admin.sellers.$id.query({ $id: id })
});
var subscriptionPlansQuery = (currencyCode) => ({
  queryKey: subscriptionPlansQueryKeys.list({ currency_code: currencyCode, offset: 0, limit: 100 }),
  queryFn: async () => sdk.admin.subscriptionPlans.query({ currency_code: currencyCode, offset: 0, limit: 100 })
});
var storeDetailLoader = async ({ params }) => {
  const id = params.id;
  const sellerData = await queryClient.ensureQueryData({
    ...sellerDetailQuery(id),
    staleTime: 9e4
  });
  const currencyCode = sellerData.seller?.currency_code;
  if (currencyCode) {
    queryClient.ensureQueryData({
      ...subscriptionPlansQuery(currencyCode),
      staleTime: 9e4
    });
  }
  return sellerData;
};
export {
  StoreDetailBreadcrumb as Breadcrumb,
  StoreDetailPage as Component,
  storeDetailLoader as loader
};
