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 = "`<Dynamic>` タグは、データを元にレンダリングするときに便利です。ネイティブ要素を表す文字列やコンポーネント関数を渡すと、提供された残りの props でレンダリングできます。\n\n`<Show>` や `<Switch>` コンポーネントをたくさん書くよりコンパクトになることが多いです。\n\nこの例では、この `<Switch>` 文を:\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\n以下に置き換えることができます:\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 };
