import { NodeWrapper, traceKeys } from "./index.mjs";
import { createElement } from "react";
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
import { NodeType } from "@intlayer/types";

//#region src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx
const EnumerationWrapper = (props) => {
	const { keyPath, section } = props;
	return /* @__PURE__ */ jsx("div", {
		className: "ml-2 grid grid-cols-[auto,1fr] gap-2",
		children: Object.keys(section).filter((key) => !traceKeys.includes(key)).map((key) => {
			const newKeyPathEl = {
				type: NodeType.Enumeration,
				key
			};
			const newKeyPath = [...keyPath, newKeyPathEl];
			const subSection = section[NodeType.Enumeration][key];
			return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
				className: "flex items-center font-bold",
				children: key
			}), /* @__PURE__ */ createElement(NodeWrapper, {
				...props,
				key,
				keyPath: newKeyPath,
				section: subSection
			})] });
		})
	});
};

//#endregion
export { EnumerationWrapper };
//# sourceMappingURL=EnumerationWrapper.mjs.map