flotilla/src/app/components/ClassifiedStatus.svelte

22 lines
539 B
Svelte
Raw Normal View History

2026-02-04 01:09:30 +00:00
<script lang="ts">
import type {TrustedEvent} from "@welshman/util"
2026-07-28 16:16:26 +00:00
import {Classified} from "@welshman/domain"
2026-02-04 01:09:30 +00:00
import {ucFirst} from "@lib/util"
import Badge from "@lib/components/Badge.svelte"
2026-07-28 16:16:26 +00:00
import {reader} from "@app/core"
2026-02-04 01:09:30 +00:00
type Props = {
event: TrustedEvent
}
const {event}: Props = $props()
2026-08-22 20:12:11 +00:00
const status = $derived(reader(Classified)(event).status())
2026-02-04 01:09:30 +00:00
</script>
{#if status}
<Badge variant={status !== "active" ? "primary" : "neutral"} class="badge-sm rounded-full">
2026-02-04 01:09:30 +00:00
{ucFirst(status)}
</Badge>
2026-02-04 01:09:30 +00:00
{/if}