import { InputField as e } from "./fields/InputField.js";
import { TextareaField as t } from "./fields/TextareaField.js";
import { CheckboxField as n } from "./fields/CheckboxField.js";
import { CodeViewField as r } from "./fields/CodeViewField.js";
import { MarkdownViewField as i } from "./fields/MarkdownViewField.js";
import { RadioField as a } from "./fields/RadioField.js";
import { SelectField as o } from "./fields/SelectField.js";
import { SliderField as s } from "./fields/SliderField.js";
import { SwitchField as c } from "./fields/SwitchField.js";
import "react";
import { jsx as l } from "react/jsx-runtime";
//#region src/components/dynamic-form/InputController.tsx
var u = {
	checkbox: n,
	radio: a,
	switch: c,
	select: o,
	slider: s,
	text: e,
	textarea: t,
	"code-view": r,
	"markdown-view": i
}, d = Object.keys(u), f = (e, t) => {
	if (t && d.includes(t)) return t;
	let n = e;
	return n.type === "boolean" ? "checkbox" : n.enum && n.enum.length > 0 ? "select" : "text";
}, p = (e, t) => t ? `${t}.${e}` : e, m = (e) => {
	let { name: t, schema: n, ui: r, parentKey: i } = e, a = n, o = r;
	if (a.hidden) return null;
	let s = p(t, i), c = u[f(n, o?.widget)];
	return /* @__PURE__ */ l(c, {
		...e,
		name: s,
		schema: n
	});
};
//#endregion
export { m as InputController };
