/*!
 * Copyright (c) what3words http://what3words.com
 */
import { h } from "@stencil/core";
import Checkmark from "../assets/checkmark.svg";
import What3wordsLogo from "../assets/what3words-logo.svg";
export const Status = ({ tag, isLoadingSelected3waCount, selected3waCount, showHintsTooltip, toggleTooltip, }) => {
    return (h("button", { type: "button", class: {
            [`${tag}-status`]: !!tag,
            showHintsTooltip,
        }, onClick: toggleTooltip, "data-testid": "status" }, h("img", { class: { [`${tag}-status-logo`]: !!tag }, src: What3wordsLogo, alt: "what3words logo" }), h("div", { class: {
            [`${tag}-status-indicator`]: !!tag,
        } }, h("span", { class: {
            [`${tag}-status-count`]: !!tag,
            show: selected3waCount > 1 && !isLoadingSelected3waCount,
        }, "data-testid": "status-count" }, selected3waCount > 99 ? "∞" : selected3waCount), h("img", { class: {
            [`${tag}-status-valid`]: !!tag,
            show: selected3waCount === 1 || isLoadingSelected3waCount,
        }, src: Checkmark, alt: "Valid what3words address", "data-testid": "status-valid" }))));
};
