import type { BlueprintFieldDefinition } from "@nexus/shared"; import { FieldType } from "@nexus/shared"; import { DateInput } from "~/components/ui/DateInput.js"; export function DynamicFieldInput({ field, value, onChange, }: { field: BlueprintFieldDefinition; value: unknown; onChange: (key: string, val: unknown) => void; }) { const strVal = value !== undefined && value !== null ? String(value) : ""; const arrVal = Array.isArray(value) ? (value as string[]) : []; switch (field.type) { case FieldType.TEXTAREA: return (