"use client"; import { Check, Cloud } from "lucide-react"; import { Badge } from "@/components/shadcn/badge/badge"; import { Button } from "@/components/shadcn/button/button"; import { Modal } from "@/components/shadcn/modal"; import { CLOUD_UPGRADE_CONTENT, CLOUD_UPGRADE_FOOTER_NOTE, CLOUD_UPGRADE_SECONDARY_CTA, getCloudUpgradeCompareUrl, getCloudUpgradePrimaryUrl, } from "@/lib/cloud-upgrade"; import { isCloud } from "@/lib/shared/env"; import { useCloudUpgradeStore } from "@/store"; import { CLOUD_UPGRADE_FEATURE } from "@/types/cloud-upgrade"; const allowInitialAutoFocus = () => {}; export const CloudUpgradeModal = () => { const activeFeature = useCloudUpgradeStore((state) => state.activeFeature); const closeCloudUpgrade = useCloudUpgradeStore( (state) => state.closeCloudUpgrade, ); const returnFocusElement = useCloudUpgradeStore( (state) => state.returnFocusElement, ); if (isCloud()) return null; const feature = activeFeature ?? CLOUD_UPGRADE_FEATURE.GENERAL; const content = CLOUD_UPGRADE_CONTENT[feature]; return ( !open && closeCloudUpgrade()} onOpenAutoFocus={allowInitialAutoFocus} onCloseAutoFocus={(event) => { event.preventDefault(); returnFocusElement?.focus(); }} title={content.title} description={content.description} size="2xl" >
Available in Prowler Cloud

{CLOUD_UPGRADE_FOOTER_NOTE}

); };