import React from "react"; import { InjectedRouter } from "react-router"; import PATHS from "router/paths"; import { getPathWithQueryParams } from "utilities/url"; import { IFleetMaintainedApp } from "interfaces/software"; import { softwareAlreadyAddedTipContent } from "pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/FleetAppDetailsForm/FleetAppDetailsForm"; import classnames from "classnames"; import Icon from "components/Icon"; import Button from "components/buttons/Button"; import TooltipWrapper from "components/TooltipWrapper"; import TextCell from "../TextCell"; const baseClass = "installer-action-cell"; interface IInstallerActionCellProps { value?: Omit | null; router?: InjectedRouter; className?: string; teamId?: number; } const InstallerActionCell = ({ value, router, className = "w250", teamId, }: IInstallerActionCellProps) => { const cellClasses = classnames(baseClass, className); // Not all FMAs are supported for all platforms if (!value) { return ( ); } const { id, software_title_id: softwareTitleId } = value; const onClick = () => { const path = getPathWithQueryParams( PATHS.SOFTWARE_FLEET_MAINTAINED_DETAILS(id), { team_id: teamId } ); if (router && path) { router?.push(path); } }; if (softwareTitleId) { return (
); } return (
); }; export default InstallerActionCell;