"use strict";

const React = require("react");

// const { Form, Field, Label, TextInput, Section } = require("../components/form");

function Form(opts) {
	return opts.children || null;
}

function Field(opts) {
	// MARKER: Use context to tie together labels and text inputs
	return opts.children || null;
}

function Label(opts) {
	return (
		<label>{opts.children}</label>
	);
}

function TextInput(opts) {
	return (
		<input type="text" name={opts.name} />
	);
}

function Section(opts) {
	return opts.children || null;
}

module.exports = function CreateNode() {
	return (
		<Form method="post">
			<Field required>
				<Label>Name</Label>
				<TextInput name="name" />
			</Field>
			<Field>
				<Label>Type</Label>
				<TextInput name="name" />
			</Field>

			<Section label="Properties">

			</Section>
		</Form>
	);
};
