import { useMemo } from "react";
import type { ReactNode } from "react";
import { classNames } from "@calcom/lib";
import { useHasPaidPlan } from "@calcom/lib/hooks/useHasPaidPlan";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import isCalcom from "@calcom/lib/isCalcom";
import { EmptyScreen } from "@calcom/ui";
import { FiUsers } from "@calcom/ui/components/icon";
export function UpgradeTip({
dark,
title,
description,
background,
features,
buttons,
isParentLoading,
children,
}: {
dark?: boolean;
title: string;
description: string;
background: string;
features: Array<{ icon: JSX.Element; title: string; description: string }>;
buttons?: JSX.Element;
/**Chldren renders when the user is in a team */
children: JSX.Element;
isParentLoading?: ReactNode;
}) {
const { t } = useLocale();
const { isLoading, hasPaidPlan } = useHasPaidPlan();
if (hasPaidPlan) return children;
if (isParentLoading || isLoading) return <>{isParentLoading}>;
if (!isCalcom)
return
{t(description)}
{buttons}{feature.description}