import { useLocation } from 'preact-iso';
import bible from '../nkjvbible'
import { Dispatch, StateUpdater } from 'preact/hooks';
export function Header({ book, setBook }: { book: string, setBook: Dispatch<StateUpdater<string>> }) {
	const { url } = useLocation();

	return (
		<header style={{ justifyContent: "space-between", minHeight: "50px"}}>

			{/* <nav>
				<a href="/" class={url == '/' && 'active'}>
					Home
				</a>
			</nav> */}
			<select value={book} onChange={(e) => setBook(e.target.value)}>
				{bible.map(a => (
					<option key={a.name} value={a.name}>{a.name}</option>
				))}
			</select>
		</header>
	);
}
