var lesson = {
	files: [
		{
			name: "main",
			content: "import { render, Dynamic } from \"solid-js/web\";\nimport { createSignal, Switch, Match, For } from \"solid-js\";\n\nconst RedThing = () => <strong style=\"color: red\">Red Thing</strong>;\nconst GreenThing = () => <strong style=\"color: green\">Green Thing</strong>;\nconst BlueThing = () => <strong style=\"color: blue\">Blue Thing</strong>;\n\nconst options = {\n  red: RedThing,\n  green: GreenThing,\n  blue: BlueThing\n}\n\nfunction App() {\n  const [selected, setSelected] = createSignal(\"red\");\n\n  return (\n    <>\n      <select value={selected()} onInput={e => setSelected(e.currentTarget.value)}>\n        <For each={Object.keys(options)}>{\n          color => <option value={color}>{color}</option>\n        }</For>\n      </select>\n      <Switch fallback={<BlueThing />}>\n        <Match when={selected() === \"red\"} ><RedThing /></Match>\n        <Match when={selected() === \"green\"}><GreenThing /></Match>\n      </Switch>\n    </>\n  );\n}\n\nrender(() => <App />, document.getElementById(\"app\"));\n"
		}
	]
};
var solved = {
	files: [
		{
			name: "main",
			content: "import { render, Dynamic } from \"solid-js/web\";\nimport { createSignal, For } from \"solid-js\";\n\nconst RedThing = () => <strong style=\"color: red\">Red Thing</strong>;\nconst GreenThing = () => <strong style=\"color: green\">Green Thing</strong>;\nconst BlueThing = () => <strong style=\"color: blue\">Blue Thing</strong>;\n\nconst options = {\n  red: RedThing,\n  green: GreenThing,\n  blue: BlueThing\n}\n\nfunction App() {\n  const [selected, setSelected] = createSignal(\"red\");\n\n  return (\n    <>\n      <select value={selected()} onInput={e => setSelected(e.currentTarget.value)}>\n        <For each={Object.keys(options)}>{\n          color => <option value={color}>{color}</option>\n        }</For>\n      </select>\n      <Dynamic component={options[selected()]} />\n    </>\n  );\n}\n\nrender(() => <App />, document.getElementById(\"app\"));\n"
		}
	]
};
var markdown = "Das `<Dynamic>`-Tag ist nützlich, wenn man von Daten abhängig rendert. Es lässt einen entweder einen String für ein natives Element oder eine Komponenten-Funktion übergeben und rendert dieses mit dem Rest der übergebenen Props.\n\nDas ist häufig kompakter als eine Menge an `<Show>`- oder `<Switch>`-Komponenten.\n\nIn diesem Beispiel können wir die `Switch`-Anweisung ersetzen:\n\n```jsx\n<Switch fallback={<BlueThing />}>\n  <Match when={selected() === 'red'}><RedThing /></Match>\n  <Match when={selected() === 'green'}><GreenThing /></Match>\n</Switch>\n```\n\nmit:\n\n```jsx\n<Dynamic component={options[selected()]} />\n```\n";
var flow_dynamic = {
	lesson: lesson,
	solved: solved,
	markdown: markdown
};

export { flow_dynamic as default, lesson, markdown, solved };
