2026-02-03 19:00:13 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import type {ComponentProps} from "svelte"
|
2026-07-28 16:16:26 +00:00
|
|
|
import {Classified} from "@welshman/domain"
|
2026-02-04 01:09:30 +00:00
|
|
|
import CurrencySymbol from "@lib/components/CurrencySymbol.svelte"
|
2026-07-28 16:16:26 +00:00
|
|
|
import {reader} from "@app/core"
|
2026-02-03 19:00:13 +00:00
|
|
|
import Content from "@app/components/Content.svelte"
|
2026-02-03 22:18:58 +00:00
|
|
|
import ContentLinkBlock from "@app/components/ContentLinkBlock.svelte"
|
2026-02-03 19:00:13 +00:00
|
|
|
|
|
|
|
|
const props: ComponentProps<typeof Content> = $props()
|
|
|
|
|
|
2026-07-28 16:16:26 +00:00
|
|
|
const classified = reader(Classified)(props.event)
|
|
|
|
|
|
|
|
|
|
const title = classified.title()
|
|
|
|
|
const images = classified.images() ?? []
|
|
|
|
|
const price = classified.price()
|
2026-02-03 19:00:13 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-col gap-2">
|
|
|
|
|
{#if title}
|
2026-02-04 01:09:30 +00:00
|
|
|
<p class="text-xl">
|
|
|
|
|
{title} —
|
2026-07-28 16:16:26 +00:00
|
|
|
<CurrencySymbol code={price?.currency ?? "SAT"} />{price?.amount ?? 0}
|
2026-02-04 01:09:30 +00:00
|
|
|
</p>
|
2026-02-03 19:00:13 +00:00
|
|
|
{/if}
|
|
|
|
|
{#if props.event.content}
|
|
|
|
|
<Content {...props} />
|
|
|
|
|
{/if}
|
2026-03-06 23:01:15 +00:00
|
|
|
<div class="grid grid-cols-3 sm:grid-cols-5 lg:grid-cols-9 gap-2">
|
|
|
|
|
{#each images as image, i (i + image)}
|
2026-02-03 22:18:58 +00:00
|
|
|
<ContentLinkBlock event={props.event} value={{url: image}} />
|
|
|
|
|
{/each}
|
|
|
|
|
</div>
|
2026-02-03 19:00:13 +00:00
|
|
|
</div>
|