2 import DetailsLink from '../components/DetailsLink.svelte';
3 import PageLink from '../components/PageLink.svelte';
4 import OsmLink from '../components/OsmLink.svelte';
6 formatPlaceType, formatAdminLevel, formatDistance
7 } from '../lib/helpers.js';
12 bMarkUnusedLines = false,
16 const bAddressLineUsed = $derived(addressLine.isaddress);
17 const reverse_only = $derived(Nominatim_Config.Reverse_Only);
20 <tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>
21 <td class="name fw-bold">
22 {#if addressLine.localname}
23 {addressLine.localname}
25 <span class="noname">No Name</span>
28 <td>{formatPlaceType(addressLine)}</td>
29 <td><OsmLink osmType={addressLine.osm_type} osmId={addressLine.osm_id} /></td>
30 <td>{addressLine.rank_address}</td>
31 <td>{formatAdminLevel(addressLine.admin_level)}</td>
32 <!-- eslint-disable-next-line svelte/no-at-html-tags -->
33 <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>
35 {#if addressLine.osm_id}
36 <DetailsLink feature={addressLine} />
37 {:else if !reverse_only && addressLine.type.match(/^country/)}
38 <PageLink page='search'
40 params_hash={{ country: addressLine.localname }} />
41 {:else if !reverse_only && addressLine.type === 'postcode'}
42 <PageLink page='search'
44 params_hash={{ postalcode: addressLine.localname, country: sCountryCode }} />
51 color: var(--bs-secondary-color);