/*!
 * Copyright (c) what3words http://what3words.com
 */
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s)
        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
            t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import { DEFAULTS } from "../../../lib/constants";
import { h } from "@stencil/core";
import SeaIcon from "../assets/sea.svg";
export const W3wSuggestion = (_a) => {
    var { tag, opt } = _a, props = __rest(_a, ["tag", "opt"]);
    return (h("li", Object.assign({}, props), h("div", { class: `${tag}-address`, "data-testid": "address" }, h("what3words-symbol", { size: 14, color: DEFAULTS.iconColor }), h("div", { class: `${tag}-words`, "data-testid": "words" }, opt.words)), h("div", { class: `${tag}-nearest-place`, "data-testid": "nearest-place" }, h("div", { class: `${tag}-nearest-place-text`, "data-testid": "nearest-place-text" }, opt.nearestPlace ? (opt.nearestPlace) : (h("img", { class: `${tag}-sea-icon`, src: SeaIcon, alt: "Ocean" }))), opt.distanceToFocusKm && !isNaN(opt.distanceToFocusKm) && (h("div", { class: `${tag}-nearest-place-distance`, "data-testid": "nearest-place-distance" }, opt.distanceToFocusKm, "km")))));
};
