<script>import { createEventDispatcher } from 'svelte';
import Button from '../atoms/Button.svelte';
export let offIcon = '';
export let onIcon = '';
export let offLabel = '';
export let onLabel = '';
export let checked = false;
export let isIcon = !onLabel && !offLabel;
const dispatch = createEventDispatcher();
const onClick = (e) => {
    checked = !checked;
    dispatch('click', e);
};
</script>

<Button
	class="UI-ToggleButton"
	label={checked ? onLabel : offLabel}
	icon={checked ? onIcon : offIcon}
	on:click={onClick}
	{isIcon}
/>

<style></style>
