"use client"; import Link from "next/link"; import { Lock, Rocket, Sparkles, Plug, CheckCircle2, } from "lucide-react"; import { Button, Card, CardContent, Badge } from "@/components/ds"; import { CommunicationBreadcrumbs } from "@/modules/communication/components/CommunicationBreadcrumbs"; import { useCommunicationCapabilities, isFeatureEnabled, } from "@/modules/communication/hooks/useCommunicationCapabilities"; import { CommunicationPageLoader, CommunicationPageError } from "@/modules/communication/pages/shared"; import type { FeatureLockConfig } from "@/modules/communication/types"; export function CommunicationFeatureLock({ config, children, }: { config: FeatureLockConfig; children?: React.ReactNode; }) { const caps = useCommunicationCapabilities(); if (caps.isLoading) return ; if (caps.error) return caps.refetch()} />; const enabled = isFeatureEnabled(caps.data?.features, config.feature); if (enabled && children) return <>{children}; return (
{config.bundle ? `نیازمند ${config.bundle}` : "به‌زودی"}

{config.title}

{config.description}

{config.phase ? (

فاز برنامه‌ریزی: {config.phase}

) : null}

قابلیت‌های برنامه‌ریزی‌شده

    {config.capabilities.map((c) => (
  • {c}
  • ))}

پیش‌نمایش رابط کاربری

این ماژول با طراحی production-ready آماده است و پس از فعال‌سازی backend به‌صورت خودکار باز می‌شود.

{config.integrations?.length ? (

یکپارچه‌سازی‌ها

{config.integrations.map((i) => ( {i} ))}
) : null}

باز شدن خودکار: وقتی /capabilities{" "} ویژگی {config.feature} را فعال کند.

); } export function createCommunicationLockedPage(config: FeatureLockConfig) { return function CommunicationLockedPage() { return ; }; } export function createCommunicationFeatureGate(config: FeatureLockConfig, Page: React.ComponentType) { return function CommunicationGatedPage() { return ( ); }; }