<script lang="ts">
import ToggleButton from "layout/ToggleButton.svelte";
import type { FSPermissions } from "lib/FilesystemAPI.svelte";

let {
	permissions = $bindable()
}: {
	permissions: FSPermissions
} = $props();
</script>

{#if permissions !== undefined}
	<ToggleButton group_first bind:on={permissions.read}>Read</ToggleButton>
	<ToggleButton group_middle bind:on={permissions.write}>Write</ToggleButton>
	<ToggleButton group_last bind:on={permissions.delete}>Delete</ToggleButton>
{/if}
