var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/salesSdk/demo/index.tsx
var demo_exports = {};
__export(demo_exports, {
  SalesSdkDemo: () => SalesSdkDemo,
  default: () => demo_default
});
module.exports = __toCommonJS(demo_exports);
var import_react = __toESM(require("react"));
var import_antd = require("antd");
var import_SalesSdkProvider = require("../context/SalesSdkProvider");
var import_DemoTabDetail = require("./components/DemoTabDetail");
var import_DemoTabCreate = require("./components/DemoTabCreate");
var import_DemoTabEdit = require("./components/DemoTabEdit");
var import_fixtures = require("./fixtures");
var import_index = require("./index.less");
var DEFAULT_OS_KEY = "sales-sdk-demo";
function SalesSdkDemo({
  osKey = DEFAULT_OS_KEY,
  orderId,
  businessCode,
  otherParams,
  rulesHooks,
  className
}) {
  const rootClassName = ["sales-sdk-demo", className].filter(Boolean).join(" ");
  const baseOsKey = osKey || DEFAULT_OS_KEY;
  const providerCommon = {
    businessCode,
    otherParams,
    rulesHooks,
    autoBootstrap: false
  };
  return /* @__PURE__ */ import_react.default.createElement("div", { className: rootClassName }, /* @__PURE__ */ import_react.default.createElement(
    import_antd.Tabs,
    {
      className: "sales-sdk-demo__tabs",
      defaultActiveKey: "detail",
      destroyInactiveTabPane: true,
      items: [
        {
          key: "detail",
          label: "详情展示",
          children: /* @__PURE__ */ import_react.default.createElement(import_SalesSdkProvider.SalesSdkProvider, { osKey: `${baseOsKey}-detail`, ...providerCommon }, /* @__PURE__ */ import_react.default.createElement(import_DemoTabDetail.DemoTabDetail, { initialOrderId: orderId ?? import_fixtures.FIXTURE_DETAIL.orderId }))
        },
        {
          key: "create",
          label: "新建",
          children: /* @__PURE__ */ import_react.default.createElement(import_SalesSdkProvider.SalesSdkProvider, { osKey: `${baseOsKey}-create`, ...providerCommon }, /* @__PURE__ */ import_react.default.createElement(import_DemoTabCreate.DemoTabCreate, null))
        },
        {
          key: "edit",
          label: "编辑",
          children: /* @__PURE__ */ import_react.default.createElement(import_SalesSdkProvider.SalesSdkProvider, { osKey: `${baseOsKey}-edit`, ...providerCommon }, /* @__PURE__ */ import_react.default.createElement(import_DemoTabEdit.DemoTabEdit, { initialOrderId: orderId ?? import_fixtures.FIXTURE_EDIT.orderId }))
        }
      ]
    }
  ));
}
var demo_default = SalesSdkDemo;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  SalesSdkDemo
});
