import {
  require_node
} from "/build/_shared/chunk-G7CHZRZX.js";
import {
  Button
} from "/build/_shared/chunk-OGUYUMUT.js";
import {
  require_jsx_dev_runtime
} from "/build/_shared/chunk-XGOTYLZ5.js";
import {
  Link,
  useLoaderData,
  useNavigate
} from "/build/_shared/chunk-RG2SZ2V3.js";
import {
  createHotContext
} from "/build/_shared/chunk-73ZPIOGA.js";
import "/build/_shared/chunk-UWV35TSL.js";
import "/build/_shared/chunk-U4FRFQSK.js";
import {
  require_react
} from "/build/_shared/chunk-7M6SC7J5.js";
import {
  __toESM
} from "/build/_shared/chunk-PNG5AS42.js";

// app/routes/rule-groups._index.tsx
var import_react = __toESM(require_react(), 1);
var import_node = __toESM(require_node(), 1);
var import_jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
if (!window.$RefreshReg$ || !window.$RefreshSig$ || !window.$RefreshRuntime$) {
  console.warn("remix:hmr: React Fast Refresh only works when the Remix compiler is running in development mode.");
} else {
  prevRefreshReg = window.$RefreshReg$;
  prevRefreshSig = window.$RefreshSig$;
  window.$RefreshReg$ = (type, id) => {
    window.$RefreshRuntime$.register(type, '"app\\\\routes\\\\rule-groups._index.tsx"' + id);
  };
  window.$RefreshSig$ = window.$RefreshRuntime$.createSignatureFunctionForTransform;
}
var prevRefreshReg;
var prevRefreshSig;
var _s = $RefreshSig$();
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app\\routes\\rule-groups._index.tsx"
  );
}
var meta = () => {
  return [{
    title: "\u4E2D\u56FD\u70DF\u8349AI\u5408\u540C\u53CA\u5377\u5B97\u5BA1\u6838\u7CFB\u7EDF - \u8BC4\u67E5\u70B9\u5206\u7EC4\u5217\u8868"
  }, {
    name: "description",
    content: "\u8BC4\u67E5\u70B9\u5206\u7EC4\u7BA1\u7406"
  }];
};
function RuleGroupsPage() {
  _s();
  const {
    groups
  } = useLoaderData();
  const navigate = useNavigate();
  const parentGroups = groups.filter((group) => group.parentId === null);
  const getChildGroups = (parentId) => {
    return groups.filter((group) => group.parentId === parentId);
  };
  const handleDelete = (id) => {
    if (window.confirm("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u5206\u7EC4\u5417\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\uFF0C\u4E14\u4F1A\u5220\u9664\u8BE5\u5206\u7EC4\u4E0B\u7684\u6240\u6709\u8BC4\u67E5\u70B9\u3002")) {
      alert(`\u5220\u9664\u5206\u7EC4: ${id}`);
    }
  };
  const handleCreate = () => {
    navigate("/rule-groups/new");
  };
  const toggleExpand = (groupId) => {
    const childRows = document.querySelectorAll(`.child-of-${groupId}`);
    childRows.forEach((row) => {
      row.style.display = row.style.display === "none" ? "table-row" : "none";
    });
    const icon = document.querySelector(`span.expand-icon[data-group-id="${groupId}"] i`);
    if (icon) {
      icon.classList.toggle("ri-arrow-down-s-line");
      icon.classList.toggle("ri-arrow-right-s-line");
    }
  };
  const handleKeyDown = (e, groupId) => {
    if (e.key === "Enter" || e.key === " ") {
      e.preventDefault();
      toggleExpand(groupId);
    }
  };
  return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "p-6", children: [
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "mb-4 p-3 bg-blue-100 border border-blue-300 rounded text-blue-800", children: [
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("h3", { className: "font-bold text-lg", children: "\u5F53\u524D\u9875\u9762: \u8BC4\u67E5\u70B9\u5206\u7EC4\u5217\u8868 (rule-groups._index.tsx)" }, void 0, false, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 184,
        columnNumber: 9
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", { children: "\u5982\u679C\u4F60\u770B\u5230\u8FD9\u4E2A\u63D0\u793A\uFF0C\u8BF4\u660E\u4F60\u5DF2\u6210\u529F\u5230\u8FBE\u8BC4\u67E5\u70B9\u5206\u7EC4\u5217\u8868\u9875\u9762\u3002" }, void 0, false, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 185,
        columnNumber: 9
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "mt-2", children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("a", { href: "/debug", className: "text-blue-600 hover:underline", children: "\u67E5\u770B\u8DEF\u7531\u8BCA\u65AD\u9875\u9762" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 187,
          columnNumber: 11
        }, this),
        " |",
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("a", { href: "/", className: "ml-2 text-blue-600 hover:underline", children: "\u8FD4\u56DE\u9996\u9875" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 188,
          columnNumber: 11
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 186,
        columnNumber: 9
      }, this)
    ] }, void 0, true, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 183,
      columnNumber: 7
    }, this),
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex justify-between items-center mb-4", children: [
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("h2", { className: "text-xl font-medium", children: "\u8BC4\u67E5\u70B9\u5206\u7EC4\u7BA1\u7406" }, void 0, false, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 194,
        columnNumber: 9
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex", children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "default", className: "mr-2", icon: "ri-arrow-down-s-line", onClick: () => document.querySelectorAll(".child-row").forEach((row) => row.style.display = "table-row"), children: "\u5C55\u5F00\u5168\u90E8" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 196,
          columnNumber: 11
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "default", className: "mr-2", icon: "ri-arrow-up-s-line", onClick: () => document.querySelectorAll(".child-row").forEach((row) => row.style.display = "none"), children: "\u6536\u8D77\u5168\u90E8" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 199,
          columnNumber: 11
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "primary", icon: "ri-add-line", onClick: handleCreate, children: "\u65B0\u589E\u5206\u7EC4" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 202,
          columnNumber: 11
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 195,
        columnNumber: 9
      }, this)
    ] }, void 0, true, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 193,
      columnNumber: 7
    }, this),
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "card mb-4", children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "card-body", children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex flex-wrap items-end gap-4", children: [
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex-1 min-w-[200px]", children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("label", { htmlFor: "groupName", className: "form-label", children: "\u5206\u7EC4\u540D\u79F0" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 213,
          columnNumber: 15
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("input", { type: "text", id: "groupName", className: "form-input", placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D\u79F0" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 214,
          columnNumber: 15
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 212,
        columnNumber: 13
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex-1 min-w-[200px]", children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("label", { htmlFor: "groupCode", className: "form-label", children: "\u5206\u7EC4\u7F16\u7801" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 217,
          columnNumber: 15
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("input", { type: "text", id: "groupCode", className: "form-input", placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u7F16\u7801" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 218,
          columnNumber: 15
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 216,
        columnNumber: 13
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex-1 min-w-[200px]", children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("label", { htmlFor: "groupStatus", className: "form-label", children: "\u72B6\u6001" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 221,
          columnNumber: 15
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("select", { id: "groupStatus", className: "form-select", children: [
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("option", { value: "", children: "\u5168\u90E8" }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 223,
            columnNumber: 17
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("option", { value: "true", children: "\u542F\u7528" }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 224,
            columnNumber: 17
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("option", { value: "false", children: "\u7981\u7528" }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 225,
            columnNumber: 17
          }, this)
        ] }, void 0, true, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 222,
          columnNumber: 15
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 220,
        columnNumber: 13
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex items-center", children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "default", className: "mr-2", icon: "ri-refresh-line", children: "\u91CD\u7F6E" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 229,
          columnNumber: 15
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "primary", icon: "ri-search-line", children: "\u641C\u7D22" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 232,
          columnNumber: 15
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 228,
        columnNumber: 13
      }, this)
    ] }, void 0, true, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 211,
      columnNumber: 11
    }, this) }, void 0, false, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 210,
      columnNumber: 9
    }, this) }, void 0, false, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 209,
      columnNumber: 7
    }, this),
    /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "card", children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "card-body", children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("table", { className: "table tree-table", children: [
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("thead", { children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("tr", { children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("th", { style: {
          width: "400px"
        }, children: "\u5206\u7EC4\u540D\u79F0" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 247,
          columnNumber: 19
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("th", { children: "\u5206\u7EC4\u7F16\u7801" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 250,
          columnNumber: 19
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("th", { children: "\u8BC4\u67E5\u70B9\u6570\u91CF" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 251,
          columnNumber: 19
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("th", { children: "\u72B6\u6001" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 252,
          columnNumber: 19
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("th", { children: "\u521B\u5EFA\u65F6\u95F4" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 253,
          columnNumber: 19
        }, this),
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("th", { style: {
          width: "180px"
        }, children: "\u64CD\u4F5C" }, void 0, false, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 254,
          columnNumber: 19
        }, this)
      ] }, void 0, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 246,
        columnNumber: 17
      }, this) }, void 0, false, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 245,
        columnNumber: 15
      }, this),
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("tbody", { children: parentGroups.map((parent) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(import_react.default.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("tr", { className: "group-row parent-row", "data-group-id": parent.id, children: [
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex items-center", children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", { className: "expand-icon", "data-group-id": parent.id, onClick: () => toggleExpand(parent.id), onKeyDown: (e) => handleKeyDown(e, parent.id), role: "button", tabIndex: 0, "aria-label": "\u5C55\u5F00/\u6536\u8D77", children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("i", { className: "ri-arrow-down-s-line text-primary" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 267,
              columnNumber: 29
            }, this) }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 265,
              columnNumber: 27
            }, this),
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, { to: `/rules?groupId=${parent.id}`, className: "text-primary hover:underline flex items-center ml-1", children: [
              /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("i", { className: "ri-folder-line mr-1" }, void 0, false, {
                fileName: "app/routes/rule-groups._index.tsx",
                lineNumber: 271,
                columnNumber: 29
              }, this),
              " ",
              parent.name
            ] }, void 0, true, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 269,
              columnNumber: 27
            }, this),
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", { className: "group-badge parent-badge", children: "\u4E00\u7EA7\u5206\u7EC4" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 273,
              columnNumber: 27
            }, this)
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 264,
            columnNumber: 25
          }, this) }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 263,
            columnNumber: 23
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: parent.code }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 276,
            columnNumber: 23
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, { to: `/rules?groupId=${parent.id}`, className: "badge bg-primary text-white", children: parent.ruleCount }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 278,
              columnNumber: 25
            }, this),
            parent.childGroupCount > 0 && /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", { className: "text-secondary text-sm ml-1", children: [
              "| \u5B50\u5206\u7EC4: ",
              parent.childGroupCount
            ] }, void 0, true, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 281,
              columnNumber: 56
            }, this)
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 277,
            columnNumber: 23
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", { className: `status-dot ${parent.isActive ? "status-success" : "status-error"}` }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 286,
              columnNumber: 25
            }, this),
            parent.isActive ? "\u542F\u7528" : "\u7981\u7528"
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 285,
            columnNumber: 23
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: parent.createdAt }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 289,
            columnNumber: 23
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { className: "py-3 px-2 text-center", children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "default", size: "small", className: "text-primary mr-2", icon: "ri-edit-line", onClick: () => navigate(`/rule-groups/${parent.id}/edit`), children: "\u7F16\u8F91" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 291,
              columnNumber: 25
            }, this),
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "danger", size: "small", icon: "ri-delete-bin-line", onClick: () => handleDelete(parent.id), children: "\u5220\u9664" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 295,
              columnNumber: 25
            }, this)
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 290,
            columnNumber: 23
          }, this)
        ] }, void 0, true, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 262,
          columnNumber: 21
        }, this),
        getChildGroups(parent.id).map((child) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("tr", { className: `group-row child-row child-of-${parent.id}`, "data-parent-id": parent.id, "data-group-id": child.id, children: [
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex items-center ml-8", children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, { to: `/rules?groupId=${child.id}`, className: "text-primary hover:underline flex items-center", children: [
              /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("i", { className: "ri-file-list-line mr-1" }, void 0, false, {
                fileName: "app/routes/rule-groups._index.tsx",
                lineNumber: 309,
                columnNumber: 31
              }, this),
              " ",
              child.name
            ] }, void 0, true, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 307,
              columnNumber: 29
            }, this),
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", { className: "group-badge child-badge", children: "\u4E8C\u7EA7\u5206\u7EC4" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 311,
              columnNumber: 29
            }, this)
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 306,
            columnNumber: 27
          }, this) }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 305,
            columnNumber: 25
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: child.code }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 314,
            columnNumber: 25
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, { to: `/rules?groupId=${child.id}`, className: "badge bg-primary text-white", children: child.ruleCount }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 316,
            columnNumber: 27
          }, this) }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 315,
            columnNumber: 25
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", { className: `status-dot ${child.isActive ? "status-success" : "status-error"}` }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 321,
              columnNumber: 27
            }, this),
            child.isActive ? "\u542F\u7528" : "\u7981\u7528"
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 320,
            columnNumber: 25
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { children: child.createdAt }, void 0, false, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 324,
            columnNumber: 25
          }, this),
          /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("td", { className: "py-3 px-2 text-center", children: [
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "default", size: "small", className: "text-primary mr-2", icon: "ri-edit-line", onClick: () => navigate(`/rule-groups/${child.id}/edit`), children: "\u7F16\u8F91" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 326,
              columnNumber: 27
            }, this),
            /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Button, { type: "danger", size: "small", icon: "ri-delete-bin-line", onClick: () => handleDelete(child.id), children: "\u5220\u9664" }, void 0, false, {
              fileName: "app/routes/rule-groups._index.tsx",
              lineNumber: 330,
              columnNumber: 27
            }, this)
          ] }, void 0, true, {
            fileName: "app/routes/rule-groups._index.tsx",
            lineNumber: 325,
            columnNumber: 25
          }, this)
        ] }, child.id, true, {
          fileName: "app/routes/rule-groups._index.tsx",
          lineNumber: 303,
          columnNumber: 61
        }, this))
      ] }, parent.id, true, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 260,
        columnNumber: 45
      }, this)) }, void 0, false, {
        fileName: "app/routes/rule-groups._index.tsx",
        lineNumber: 259,
        columnNumber: 15
      }, this)
    ] }, void 0, true, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 244,
      columnNumber: 13
    }, this) }, void 0, false, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 243,
      columnNumber: 11
    }, this) }, void 0, false, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 242,
      columnNumber: 9
    }, this) }, void 0, false, {
      fileName: "app/routes/rule-groups._index.tsx",
      lineNumber: 241,
      columnNumber: 7
    }, this)
  ] }, void 0, true, {
    fileName: "app/routes/rule-groups._index.tsx",
    lineNumber: 181,
    columnNumber: 10
  }, this);
}
_s(RuleGroupsPage, "wBR/OBT3qPYjsH+gsITYCpVlwRM=", false, function() {
  return [useLoaderData, useNavigate];
});
_c = RuleGroupsPage;
var _c;
$RefreshReg$(_c, "RuleGroupsPage");
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;
export {
  RuleGroupsPage as default,
  meta
};
//# sourceMappingURL=/build/routes/rule-groups._index-YBPE5YGR.js.map
