"use client"; import { BadgeCheck, BadgeDollarSign, Briefcase, Building, Rocket, } from "lucide-react"; import { useState } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; const formatPrice = (value: string | number) => `${(typeof value === "string" ? Number(value) : value).toLocaleString("fa-IR")} ریال`; interface FeatureSection { category: string; features: { name: string; basic: string | boolean; business: string | boolean; enterprise: string | boolean; }[]; } const pricingPlans = [ { icon: Rocket, name: "طرح پایه", price: { monthly: 19, yearly: 199, }, features: [ "ابزارهای پایه مدیریت وظایف", "همگام‌سازی تقویم با اتصال ایمیل و تقویم", "دسترسی به ۱ داشبورد برای پیگیری وظایف", "پیشنهادها و بینش‌های محدود هوش مصنوعی", "پشتیبانی ایمیلی در ساعات کاری و دسترسی به انجمن", ], }, { icon: Briefcase, name: "طرح تجاری", price: { monthly: 29, yearly: 299, }, features: [ "همه‌چیز در طرح رایگان، به‌علاوه:", "لیست وظایف نامحدود", "همگام‌سازی پیشرفته تقویم", "بینش‌های مبتنی بر هوش مصنوعی", "دسترسی به داشبوردهای سفارشی", "پشتیبانی ایمیل با اولویت", ], }, { icon: Building, name: "طرح سازمانی", price: { monthly: 49, yearly: 499, }, features: [ "همه‌چیز در طرح حرفه‌ای، به‌علاوه:", "مدیر موفقیت مشتری اختصاصی", "یکپارچه‌سازی‌های سفارشی", "همکاری بلادرنگ", "دسترسی مبتنی بر نقش", "پشتیبانی اولویت‌دار ۲۴/۷", ], }, ]; const comparisonFeatures: FeatureSection[] = [ { category: "ابزارهای اصلی", features: [ { name: "مدیریت وظایف", basic: "۱۰", business: "۲۵", enterprise: "نامحدود", }, { name: "همگام‌سازی تقویم", basic: true, business: true, enterprise: true, }, { name: "یادآورها", basic: true, business: true, enterprise: true, }, { name: "همکاری", basic: false, business: true, enterprise: true, }, { name: "اعلان‌ها", basic: false, business: false, enterprise: true, }, ], }, { category: "بینش بهره‌وری", features: [ { name: "تحلیل‌ها", basic: "۱۰", business: "۲۵", enterprise: "نامحدود", }, { name: "گزارش‌ها", basic: true, business: true, enterprise: true, }, { name: "ثبت زمان", basic: true, business: true, enterprise: true, }, { name: "پیگیری اهداف", basic: false, business: true, enterprise: true, }, { name: "روندها", basic: false, business: false, enterprise: true, }, ], }, { category: "اتوماسیون پیگیری فروش", features: [ { name: "اتوماسیون وظایف", basic: "۱۰", business: "۲۵", enterprise: "نامحدود", }, { name: "وظایف تکرارشونده", basic: true, business: true, enterprise: true, }, { name: "یکپارچه‌سازی‌ها", basic: true, business: true, enterprise: true, }, { name: "دسترسی اتصال هوشمند", basic: false, business: true, enterprise: true, }, { name: "قالب‌های گردش کار", basic: false, business: false, enterprise: true, }, ], }, ]; interface Pricing21Props { className?: string; } const Pricing21 = ({ className }: Pricing21Props) => { const [isMonthly, setIsMonthly] = useState(true); return (
پیشنهاد ویژه

تعرفه برای همه

طرحی را انتخاب کنید که با نیازهای بهره‌وری شما هماهنگ باشد

); }; const PlanHeaders = ({ isMonthly }: { isMonthly: boolean }) => (
{pricingPlans.map((plan, index) => (

{plan.name}

<>
{formatPrice( isMonthly ? plan.price.monthly : plan.price.yearly, )} {isMonthly ? "در ماه" : "در سال"}

{isMonthly ? `یا ${formatPrice(plan.price.yearly)} سالانه` : `یا ${formatPrice(plan.price.monthly)} در ماه`}

))}
); const FeatureSections = () => ( <> {comparisonFeatures.map((section, sectionIndex) => (

{section.category}

{section.features.map((feature, featureIndex) => (
{feature.name}
{[feature.basic, feature.business, feature.enterprise].map( (value, i) => (
{typeof value === "boolean" ? ( value ? ( ) : null ) : ( {value} )}
), )}
))}
))} ); export { Pricing21 };