import { useState } from 'react';
import './Counter.css';

export default function Counter({
	children,
	count: initialCount,
}: {
	children: JSX.Element;
	count: number;
}) {
	const [count, setCount] = useState(initialCount);
	const add = () => setCount((i) => i + 1);
	const subtract = () => setCount((i) => i - 1);

	return (
		<>
			<div className="counter">
				<button onClick={subtract}>-</button>
				<pre>{count}</pre>
				<button onClick={add}>+</button>
			</div>
			<div className="counter-message">{children}</div>
		</>
	);
}
td class='form'><form method='get'>
<input type='hidden' name='id' value='80a7d803e13b4649ec4249a22be7f853b0a61899'/><input type='hidden' name='showmsg' value='1'/><select name='h' onchange='this.form.submit();'>
<option value='development' selected='selected'>development</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Unnamed repository; edit this file 'description' to name the repository.</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/ansg191/WarpX/about/'>about</a><a href='/ansg191/WarpX/'>summary</a><a href='/ansg191/WarpX/refs/?id=80a7d803e13b4649ec4249a22be7f853b0a61899'>refs</a><a class='active' href='/ansg191/WarpX/log/Source/Python/WarpX_py.cpp?showmsg=1&amp;follow=1'>log</a><a href='/ansg191/WarpX/tree/Source/Python/WarpX_py.cpp?id=80a7d803e13b4649ec4249a22be7f853b0a61899'>tree</a><a href='/ansg191/WarpX/commit/Source/Python/WarpX_py.cpp?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;follow=1'>commit</a><a href='/ansg191/WarpX/diff/Source/Python/WarpX_py.cpp?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;follow=1'>diff</a></td><td class='form'><form class='right' method='get' action='/ansg191/WarpX/log/Source/Python/WarpX_py.cpp'>
<input type='hidden' name='id' value='80a7d803e13b4649ec4249a22be7f853b0a61899'/><input type='hidden' name='showmsg' value='1'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/ansg191/WarpX/log/?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;showmsg=1&amp;follow=1'>root</a>/<a href='/ansg191/WarpX/log/Source?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;showmsg=1&amp;follow=1'>Source</a>/<a href='/ansg191/WarpX/log/Source/Python?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;showmsg=1&amp;follow=1'>Python</a>/<a href='/ansg191/WarpX/log/Source/Python/WarpX_py.cpp?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;showmsg=1&amp;follow=1'>WarpX_py.cpp</a> (<a href='/ansg191/WarpX/log/Source/Python/WarpX_py.cpp?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;showmsg=1'>unfollow</a>)</div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/ansg191/WarpX/log/Source/Python/WarpX_py.cpp?id=80a7d803e13b4649ec4249a22be7f853b0a61899&amp;follow=1'>Collapse</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
<tr class='logheader'><td><span title='2019-08-27 14:26:34 -0700'>2019-08-27</span></td><td class='logsubject'><a href='/ansg191/WarpX/commit/Docs/source/running_cpp/parameters.rst?id=608c6e59160458fe2a982d50f1a0ce75d6acc85d&amp;follow=1'>typo in doc</a></td><td><img src='//www.gravatar.com/avatar/ee0b6062a643a0f26f42aee4bf0fa01d?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> MaxThevenet
</td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+1</span></td></tr>
<tr class='nohover-highlight'><td/><td colspan='5' class='logmsg'>
</td></tr>
<tr class='logheader'><td><span title='2019-08-27 14:19:00 -0700'>2019-08-27</span></td><td class='logsubject'><a href='/ansg191/WarpX/commit/Regression/WarpX-tests.ini?id=23673f7fd01aa8d7e138669675bb7cd8397d8f29&amp;follow=1'>only dump relevant particle quantities in automated tests</a></td><td><img src='//www.gravatar.com/avatar/ee0b6062a643a0f26f42aee4bf0fa01d?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> MaxThevenet
</td><td>1</td><td><span class='deletions'>-5</span>/<span class='insertions'>+5</span></td></tr>
<tr class='nohover-highlight'><td/><td colspan='5' class='logmsg'>
</td></tr>
<tr class='logheader'><td><span title='2019-08-27 13:48:43 -0700'>2019-08-27</span></td><td class='logsubject'><a href='/ansg191/WarpX/commit/Source/Particles/PhysicalParticleContainer.cpp?id=7a5d2666a6a266f94e4acaa5710ffb0e453d6600&amp;follow=1'>Bug fix for RZ multimode on GPU</a></td><td><img src='//www.gravatar.com/avatar/0ce53efe899a1a0320b514058a76ee25?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> grote
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+2</span></td></tr>
<tr class='nohover-highlight'><td/><td colspan='5' class='logmsg'>
</td></tr>
<tr class='logheader'><td><span title='2019-08-26 19:47:16 -0700'>2019-08-26</span></td><td class='logsubject'><a href='/ansg191/WarpX/commit/Examples/batchScripts/batch_summit.sh?id=83d451a02b3fc493e3e48d992599e60319042860&amp;follow=1'>make scripts more general and clean the doc</a></td><td><img src='//www.gravatar.com/avatar/ee0b6062a643a0f26f42aee4bf0fa01d?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> MaxThevenet
</td><td>5</td><td><span class='deletions'>-35</span>/<span class='insertions'>+42</span></td></tr>
<tr class='nohover-highlight'><td/><td colspan='5' class='logmsg'>
</td></tr>
<tr class='logheader'><td><span title='2019-08-26 13:45:36 -0700'>2019-08-26</span></td><td class='logsubject'><a href='/ansg191/WarpX/commit/Source/Particles/WarpXParticleContainer.cpp?id=9dbf87a8650bb3a5eb9b3107ed72f3a8e81452f8&amp;follow=1'>Bug fix for RZ in the current deposition</a></td><td><img src='//www.gravatar.com/avatar/553c1ee3ed71c854378f0c1ed9a238df?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Dave Grote
</td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+2</span></td></tr>
<tr class='nohover-highlight'><td/><td colspan='5' class='logmsg'>
</td></tr>
<tr class='logheader'><td><span title='2019-08-26 13:33:03 -0700'>2019-08-26</span></td><td class='logsubject'><a href='/ansg191/WarpX/commit/Tools/compute_domain.py?id=619f6e12c6dc782b7465465525dca80eded1cb72&amp;follow=1'>add script to compute domain size and #cells</a></td><td><img src='//www.gravatar.com/avatar/ee0b6062a643a0f26f42aee4bf0fa01d?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> MaxThevenet
</td><td>2</td><td><span class='deletions'>-2</span>/<span class='insertions'>+23</span></td></tr>
<tr class='nohover-highlight'><td/><td colspan='5' class='logmsg'>
</td></tr>
