Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

1019 B
Raw Blame
import React from 'react';

import { FeatureKey, FeatureTier } from '@/features/billing';

import { FeatureTeaser } from './feature-teaser';

export const LockedFeatureGuard = ({
  children,
  locked,
  lockTitle,
  lockDescription,
  lockVideoUrl,
  lockDocumentationUrl,
  lockBullets,
  lockTier,
  featureKey,
  showContactSales = true,
}: LockedFeatureGuardProps) => {
  if (!locked) {
    return children;
  }

  return (
    <FeatureTeaser
      title={lockTitle}
      description={lockDescription}
      bullets={lockBullets}
      tier={lockTier}
      documentationUrl={lockDocumentationUrl}
      videoUrl={lockVideoUrl}
      featureKey={featureKey}
      showContactSales={showContactSales}
    />
  );
};

type LockedFeatureGuardProps = {
  children: React.ReactNode;
  featureKey: FeatureKey;
  showContactSales?: boolean;
  locked: boolean;
  lockTitle: string;
  lockDescription: string;
  lockVideoUrl?: string;
  lockDocumentationUrl?: string;
  lockBullets?: string[];
  lockTier?: FeatureTier;
};