<template>
	<TimeRelative :time="signal.created"></TimeRelative>
	<p>{{ formatAddressShort(signal.address) }}</p>
	<div v-if="signal.type == 'flyover pool' && signal.pool">
		<FlyoverPoolCard :location="signal.location" :markers="[]" />
	</div>
	<div v-else-if="signal.type == 'publicreport nuisance' && signal.report">
		<CardPublicReport :reportURI="signal.report.uri" />
	</div>
	<div v-else-if="signal.type == 'publicreport water' && signal.report">
		<CardPublicReport :reportURI="signal.report.uri" />
	</div>
	<div v-else>
		<p>No report or pool</p>
	</div>
</template>

<script setup lang="ts">
import FlyoverPoolCard from "@/components/FlyoverPoolCard.vue";
import CardPublicReport from "@/components/CardPublicReport.vue";
import TimeRelative from "@/components/TimeRelative.vue";
import { formatAddressShort } from "@/format";
import { Signal } from "@/type/api";
interface Props {
	signal: Signal;
}
const props = defineProps<Props>();
</script>
