<script lang="ts">
	import settings, { type Settings } from '../../stores/settings';

	export let setting: keyof Settings;
	export let on = '';
	export let off = '';
	export let sectionBreak = false;
</script>

<a
	href={'#'}
	on:click={() =>
		$settings[setting] ? settings.setKey(setting, false) : settings.setKey(setting, true)}
	>{$settings[setting] ? on : off} <slot /></a
>

<br />

{#if sectionBreak}
	<p />
{/if}
