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/components/systemSettings/registry/components/ModuleList.tsx
var ModuleList_exports = {};
__export(ModuleList_exports, {
  default: () => ModuleList_default
});
module.exports = __toCommonJS(ModuleList_exports);
var import_react = __toESM(require("react"));
var import_antd = require("antd");
var import_icons = require("@ant-design/icons");
var import_utils = require("@pisell/utils");
var sectionIcons = {
  order: /* @__PURE__ */ import_react.default.createElement(import_icons.ShoppingCartOutlined, null),
  payment: /* @__PURE__ */ import_react.default.createElement(import_icons.CreditCardOutlined, null),
  auth: /* @__PURE__ */ import_react.default.createElement(import_icons.SafetyCertificateOutlined, null),
  default: /* @__PURE__ */ import_react.default.createElement(import_icons.SettingOutlined, null)
};
var SectionList = ({
  sections,
  selectedSectionId,
  onSectionSelect
}) => {
  if (sections.length === 0) {
    return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-sections-empty" }, /* @__PURE__ */ import_react.default.createElement(
      import_antd.Empty,
      {
        description: import_utils.locales.getText("registry.sections.empty"),
        image: import_antd.Empty.PRESENTED_IMAGE_SIMPLE
      }
    ));
  }
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-sections" }, sections.map((section) => /* @__PURE__ */ import_react.default.createElement(
    import_antd.Card,
    {
      key: section.id,
      className: `pisell-settings-registry-section-item pisell-settings-registry-section-card ${selectedSectionId === section.id ? "active" : ""}`,
      hoverable: true,
      onClick: () => onSectionSelect(section.id),
      bodyStyle: { padding: "16px" }
    },
    /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-section-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-section-icon" }, sectionIcons[section.code] || sectionIcons.default), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-section-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-section-name" }, section.name), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-section-code" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { color: "blue" }, section.code)), section.description && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-settings-registry-section-description" }, section.description)))
  )));
};
var ModuleList_default = SectionList;
