import { isIconName } from '@grafana/data'; import { Badge, Card, Icon } from '@grafana/ui'; import { UIMap } from '../constants'; import { getProviderUrl } from '../utils/url'; type Props = { providerId: string; enabled: boolean; configPath?: string; authType?: string; onClick?: () => void; }; export function ProviderCard({ providerId, enabled, configPath, authType, onClick }: Props) { //@ts-expect-error const url = getProviderUrl({ configPath, id: providerId }); const [iconName, displayName] = UIMap[providerId] || ['lock', providerId.toUpperCase()]; return ( {displayName} {authType} {isIconName(iconName) && ( )} ); }