import {
  CustomerDetailPage
} from "./chunk-OW6XTJ33.js";
import "./chunk-DBYUB2YI.js";
import "./chunk-54EPH67T.js";
import "./chunk-NOWUEJ74.js";
import "./chunk-TZSOL34K.js";
import "./chunk-25LYVP3C.js";
import "./chunk-2Y3WMGN6.js";
import "./chunk-JHIMVLB2.js";
import "./chunk-PXYDR7WQ.js";
import "./chunk-DB6ANJBO.js";
import "./chunk-PHOCVOZ5.js";
import "./chunk-V5J73NPW.js";
import "./chunk-FQERBIVS.js";
import "./chunk-ULJ3OMWU.js";
import "./chunk-YBZWO4ZV.js";
import "./chunk-KAZ5BYTQ.js";
import "./chunk-3EF54XFY.js";
import "./chunk-XIZLPYEE.js";
import "./chunk-IQPN4PZJ.js";
import "./chunk-INNFZYX2.js";
import "./chunk-BDGZ4EQO.js";
import "./chunk-LAVHRER2.js";
import "./chunk-Y7QKP6QU.js";
import "./chunk-25YTS3TI.js";
import "./chunk-CMHI2RPL.js";
import "./chunk-3B6MTW5G.js";
import "./chunk-VKOE5J66.js";
import "./chunk-KBYZLKI4.js";
import "./chunk-YWWUOGJA.js";
import "./chunk-THHRRYRS.js";
import "./chunk-UZWFZMOX.js";
import "./chunk-XQNVC4Q7.js";
import "./chunk-3MDRW5MA.js";
import "./chunk-MFL2TZ3W.js";
import "./chunk-YNIIYGL4.js";
import "./chunk-CBHNHLUZ.js";
import "./chunk-VME3CJER.js";
import "./chunk-XMVTX2EN.js";
import "./chunk-5PUHROK4.js";
import "./chunk-TPPONKYW.js";
import "./chunk-DF3OGJAK.js";
import "./chunk-XRDP2SYY.js";
import "./chunk-FNBKEF54.js";
import "./chunk-EHQESDH2.js";
import "./chunk-XKVXLDSJ.js";
import "./chunk-XDZGOUCR.js";
import "./chunk-K4BGK3CO.js";
import "./chunk-YYTI5JIC.js";
import "./chunk-HAFZQK53.js";
import "./chunk-IJWG755C.js";
import "./chunk-M3YP3NX4.js";
import {
  useCustomer
} from "./chunk-UU2RQMXS.js";
import "./chunk-O4STPJR2.js";
import "./chunk-R74OHYTB.js";
import "./chunk-22XJUSMM.js";
import "./chunk-OFKUNYQJ.js";
import "./chunk-W5UPPL3W.js";
import "./chunk-LC6TM5OT.js";
import "./chunk-7SJC6BWZ.js";
import "./chunk-N4JU7GWK.js";
import "./chunk-52BRBQMY.js";
import {
  productsQueryKeys
} from "./chunk-BA2HXHTW.js";
import {
  queryClient
} from "./chunk-RHKRREUU.js";
import "./chunk-ZA2KFUFR.js";
import {
  sdk
} from "./chunk-RIN4CBRB.js";
import "./chunk-NBMM2TZK.js";

// src/pages/customers/customer-detail/breadcrumb.tsx
import { jsx } from "react/jsx-runtime";
var CustomerDetailBreadcrumb = (props) => {
  const { id } = props.params || {};
  const { customer } = useCustomer(id, void 0, {
    initialData: props.data,
    enabled: Boolean(id)
  });
  if (!customer) {
    return null;
  }
  const name = [customer.first_name, customer.last_name].filter(Boolean).join(" ");
  const display = name || customer.email;
  return /* @__PURE__ */ jsx("span", { children: display });
};

// src/pages/customers/customer-detail/loader.ts
var customerDetailQuery = (id) => ({
  queryKey: productsQueryKeys.detail(id),
  queryFn: async () => sdk.admin.customers.$id.query({ $id: id, fields: "+*addresses" })
});
var customerLoader = async ({ params }) => {
  const id = params.id;
  const query = customerDetailQuery(id);
  return queryClient.ensureQueryData(query);
};
export {
  CustomerDetailBreadcrumb as Breadcrumb,
  CustomerDetailPage as Component,
  customerLoader as loader
};
