var lesson = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport { createSignal, Show, Switch, Match } from \"solid-js\";\n\nfunction App() {\n  const [x] = createSignal(7);\n\n  return (\n    <Show\n      when={x() > 10}\n      fallback={\n        <Show\n          when={5 > x()}\n          fallback={<p>{x()} is between 5 and 10</p>}\n        >\n          <p>{x()} is less than 5</p>\n        </Show>\n      }\n    >\n      <p>{x()} is greater than 10</p>\n    </Show>\n  );\n}\n\nrender(() => <App />, document.getElementById(\"app\"));\n"
		}
	]
};
var solved = {
	files: [
		{
			name: "main",
			content: "import { render } from \"solid-js/web\";\nimport { createSignal, Switch, Match } from \"solid-js\";\n\nfunction App() {\n  const [x] = createSignal(7);\n\n  return (\n    <Switch fallback={<p>{x()} is between 5 and 10</p>}>\n      <Match when={x() > 10} >\n        <p>{x()} is greater than 10</p>\n      </Match>\n      <Match when={5 > x()}>\n        <p>{x()} is less than 5</p>\n      </Match>\n    </Switch>\n  );\n}\n\nrender(() => <App />, document.getElementById(\"app\"));\n"
		}
	]
};
var markdown = "有时需要处理 2 个以上互斥结条件。出于这个原因，我们根据 JavaScript 的 `switch`/`case` 之后大致建模出 `<Switch>` 和 `<Match>` 组件。\n\n它将尝试匹配每个条件，当第一个条件求值为真时停止渲染。如果所有这些都失败，它将渲染回退内容。\n\n我们可以用下面代码替换嵌套的 `<Show>` 组件：\n\n```jsx\n<Switch fallback={<p>{x()} is between 5 and 10</p>}>\n  <Match when={x() > 10}>\n    <p>{x()} is greater than 10</p>\n  </Match>\n  <Match when={5 > x()}>\n    <p>{x()} is less than 5</p>\n  </Match>\n</Switch>\n```\n";
var flow_switch = {
	lesson: lesson,
	solved: solved,
	markdown: markdown
};

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