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"
|
2026-06-24 20:56:53 +00:00
|
|
|
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}
|
2026-06-24 20:56:53 +00:00
|
|
|
<Badge variant={status !== "active" ? "primary" : "neutral"} class="rounded-full">
|
2026-02-04 01:09:30 +00:00
|
|
|
{ucFirst(status)}
|
2026-06-24 20:56:53 +00:00
|
|
|
</Badge>
|
2026-02-04 01:09:30 +00:00
|
|
|
{/if}
|