import React from "react";
import { useQuery } from "react-query";
import {
ISoftwareInstallResult,
ISoftwareInstallResults,
} from "interfaces/software";
import softwareAPI from "services/entities/software";
import Modal from "components/Modal";
import Button from "components/buttons/Button";
import Icon from "components/Icon";
import Textarea from "components/Textarea";
import DataError from "components/DataError/DataError";
import Spinner from "components/Spinner/Spinner";
import {
INSTALL_DETAILS_STATUS_ICONS,
SOFTWARE_INSTALL_OUTPUT_DISPLAY_LABELS,
getInstallDetailsStatusPredicate,
} from "../constants";
const baseClass = "software-install-details";
const StatusMessage = ({
result: { host_display_name, software_package, software_title, status },
}: {
result: ISoftwareInstallResult;
}) => {
return (
Fleet {getInstallDetailsStatusPredicate(status)} {software_title}{" "}
({software_package}) on {host_display_name}
{status === "pending" ? " when it comes online" : ""}.