/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */

var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var support_matrix_exports = {};
__export(support_matrix_exports, {
  FLOW_SURFACE_BLOCK_SUPPORT_BY_KEY: () => FLOW_SURFACE_BLOCK_SUPPORT_BY_KEY,
  FLOW_SURFACE_BLOCK_SUPPORT_BY_USE: () => FLOW_SURFACE_BLOCK_SUPPORT_BY_USE,
  FLOW_SURFACE_BLOCK_SUPPORT_MATRIX: () => FLOW_SURFACE_BLOCK_SUPPORT_MATRIX,
  FLOW_SURFACE_FORMAL_KEY_TO_SERVICE_KEY: () => FLOW_SURFACE_FORMAL_KEY_TO_SERVICE_KEY,
  FLOW_SURFACE_SERVICE_KEY_TO_FORMAL_KEY: () => FLOW_SURFACE_SERVICE_KEY_TO_FORMAL_KEY,
  FORMAL_FLOW_SURFACE_BLOCK_KEYS: () => FORMAL_FLOW_SURFACE_BLOCK_KEYS,
  FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX: () => FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX
});
module.exports = __toCommonJS(support_matrix_exports);
const FLOW_SURFACE_BLOCK_SUPPORT_MATRIX = [
  {
    key: "jsBlock",
    formalKey: "js-block",
    label: "JS block",
    modelUse: "JSBlockModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "table",
    formalKey: "table",
    label: "Table",
    modelUse: "TableBlockModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "calendar",
    formalKey: "calendar",
    label: "Calendar",
    modelUse: "CalendarBlockModel",
    ownerPlugin: "@nocobase/plugin-calendar",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "kanban",
    formalKey: "kanban",
    label: "Kanban",
    modelUse: "KanbanBlockModel",
    ownerPlugin: "@nocobase/plugin-kanban",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "createForm",
    formalKey: "create-form",
    label: "Form (Add new)",
    modelUse: "CreateFormModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "editForm",
    formalKey: "edit-form",
    label: "Form (Edit)",
    modelUse: "EditFormModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "form",
    label: "Form",
    modelUse: "FormBlockModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: false,
    formalBuiltin: false,
    fixtureCaptured: false,
    readbackSupported: true,
    createSupported: false
  },
  {
    key: "details",
    formalKey: "details",
    label: "Details",
    modelUse: "DetailsBlockModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "filterForm",
    formalKey: "filter-form",
    label: "Filter form",
    modelUse: "FilterFormBlockModel",
    ownerPlugin: "@nocobase/core/client",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "list",
    formalKey: "list",
    label: "List",
    modelUse: "ListBlockModel",
    ownerPlugin: "@nocobase/plugin-block-list",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "gridCard",
    formalKey: "grid-card",
    label: "Grid card",
    modelUse: "GridCardBlockModel",
    ownerPlugin: "@nocobase/plugin-block-grid-card",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "markdown",
    formalKey: "markdown",
    label: "Markdown",
    modelUse: "MarkdownBlockModel",
    ownerPlugin: "@nocobase/plugin-block-markdown",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "iframe",
    formalKey: "iframe",
    label: "Iframe",
    modelUse: "IframeBlockModel",
    ownerPlugin: "@nocobase/plugin-block-iframe",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "map",
    formalKey: "map",
    label: "Map",
    modelUse: "MapBlockModel",
    ownerPlugin: "@nocobase/plugin-map",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: false
  },
  {
    key: "chart",
    formalKey: "chart",
    label: "Chart",
    modelUse: "ChartBlockModel",
    ownerPlugin: "@nocobase/plugin-data-visualization",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "comments",
    formalKey: "comments",
    label: "Comments",
    modelUse: "CommentsBlockModel",
    ownerPlugin: "@nocobase/plugin-comments",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "recordHistory",
    formalKey: "record-history",
    label: "Record history",
    modelUse: "RecordHistoryBlockModel",
    ownerPlugin: "@nocobase/plugin-record-history",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: false,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "actionPanel",
    formalKey: "action-panel",
    label: "Action panel",
    modelUse: "ActionPanelBlockModel",
    ownerPlugin: "@nocobase/plugin-block-workbench",
    topLevelAddable: true,
    formalBuiltin: true,
    fixtureCaptured: true,
    readbackSupported: true,
    createSupported: true
  },
  {
    key: "tree",
    label: "Tree",
    modelUse: "TreeBlockModel",
    ownerPlugin: "@nocobase/plugin-block-tree",
    topLevelAddable: true,
    formalBuiltin: false,
    fixtureCaptured: false,
    readbackSupported: true,
    createSupported: true
  }
];
function hasFormalFlowSurfaceBlockKey(entry) {
  return entry.formalBuiltin && !!entry.formalKey;
}
const FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX = FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.filter(hasFormalFlowSurfaceBlockKey);
const FORMAL_FLOW_SURFACE_BLOCK_KEYS = FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map(
  (entry) => entry.formalKey
);
const FLOW_SURFACE_BLOCK_SUPPORT_BY_KEY = new Map(
  FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map((entry) => [entry.key, entry])
);
const FLOW_SURFACE_BLOCK_SUPPORT_BY_USE = new Map(
  FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map((entry) => [entry.modelUse, entry])
);
const FLOW_SURFACE_SERVICE_KEY_TO_FORMAL_KEY = new Map(
  FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map((entry) => [entry.key, entry.formalKey])
);
const FLOW_SURFACE_FORMAL_KEY_TO_SERVICE_KEY = new Map(
  FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.map((entry) => [entry.formalKey, entry.key])
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  FLOW_SURFACE_BLOCK_SUPPORT_BY_KEY,
  FLOW_SURFACE_BLOCK_SUPPORT_BY_USE,
  FLOW_SURFACE_BLOCK_SUPPORT_MATRIX,
  FLOW_SURFACE_FORMAL_KEY_TO_SERVICE_KEY,
  FLOW_SURFACE_SERVICE_KEY_TO_FORMAL_KEY,
  FORMAL_FLOW_SURFACE_BLOCK_KEYS,
  FORMAL_FLOW_SURFACE_BLOCK_SUPPORT_MATRIX
});
