"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBaseNodesLibraryData = getBaseNodesLibraryData;
const all_browser_1 = require("./all-browser");
const Switch_flyde_1 = require("./ControlFlow/Switch.flyde");
const Collect_flyde_1 = require("./Lists/Collect/Collect.flyde");
const Note_flyde_1 = require("./Note/Note.flyde");
const Lists = __importStar(require("./Lists"));
const Objects = __importStar(require("./Objects"));
const core_1 = require("@flyde/core");
const stdlibSource = {
    type: "package",
    data: "@flyde/stdlib",
};
function getBaseNodesLibraryData() {
    return {
        groups: [
            {
                title: "Essentials",
                nodes: [
                    all_browser_1.InlineValue,
                    all_browser_1.CodeExpression,
                    all_browser_1.GetAttribute,
                    all_browser_1.Http,
                    all_browser_1.Conditional,
                    Switch_flyde_1.Switch,
                    Note_flyde_1.Note,
                ].map((node) => (0, core_1.codeNodeToImportableEditorNode)(node, stdlibSource)),
            },
            {
                title: "Lists",
                nodes: [
                    all_browser_1.LoopList,
                    all_browser_1.SpreadList,
                    Collect_flyde_1.Collect,
                    Lists.GetListElement,
                    Lists.Append,
                    Lists.Reverse,
                ].map((node) => (0, core_1.codeNodeToImportableEditorNode)(node, stdlibSource)),
            },
            {
                title: "Control Flow",
                nodes: [
                    all_browser_1.Delay,
                    all_browser_1.Throttle,
                    all_browser_1.Debounce,
                    all_browser_1.Conditional,
                    all_browser_1.Interval,
                    all_browser_1.RoundRobin,
                    Switch_flyde_1.Switch,
                    all_browser_1.Publish,
                    all_browser_1.Subscribe,
                ].map((node) => (0, core_1.codeNodeToImportableEditorNode)(node, stdlibSource)),
            },
            {
                title: "Objects",
                nodes: [
                    Objects.GetAttribute,
                    Objects.SetAttribute,
                    Objects.DeleteAttribute,
                    Objects.JSONParse,
                    Objects.JSONStringify,
                    Objects.ObjectEntries,
                ].map((node) => (0, core_1.codeNodeToImportableEditorNode)(node, stdlibSource)),
            },
            {
                title: "State",
                nodes: [all_browser_1.GetGlobalState, all_browser_1.SetGlobalState].map((node) => (0, core_1.codeNodeToImportableEditorNode)(node, stdlibSource)),
            },
            {
                title: "Timing",
                nodes: [all_browser_1.Delay, all_browser_1.Throttle, all_browser_1.Debounce, all_browser_1.Interval, all_browser_1.RoundRobin].map((node) => (0, core_1.codeNodeToImportableEditorNode)(node, stdlibSource)),
            },
        ],
    };
}
