<script lang="ts">
	import Dropdown from '$lib/components/Dropdown.svelte';

	let visible = false;
	let button: HTMLElement;
</script>

<div class="relative">
	<button
		type="button"
		class="btn-slate rounded-inherit relative hover:bg-blue-700 [&:not(:only-child)]:bg-blue-700"
		title="Set flag..."
		bind:this={button}
		on:click={() => (visible = !visible)}
	>
		<span class="icon-base icon-[material-symbols--flag] pointer-events-none" />
	</button>

	<Dropdown parent={button} bind:visible>
		<div class="grid grid-cols-[min-content_min-content] gap-1">
			<slot />
		</div>
	</Dropdown>
</div>
