// @ts-nocheck import { AppToaster, Group, T } from '@/components'; import { useGetLemonSqueezyCheckout } from '@/hooks/query'; import { Intent } from '@blueprintjs/core'; import { PricingPlan } from '@/components/PricingPlan/PricingPlan'; interface SubscriptionPricingProps { slug: string; label: string; description: string; features?: Array; featured?: boolean; price: string; pricePeriod: string; } function SubscriptionPricing({ featured, label, description, features, price, pricePeriod, }: SubscriptionPricingProps) { const { mutateAsync: getLemonCheckout, isLoading } = useGetLemonSqueezyCheckout(); const handleClick = () => { getLemonCheckout({ variantId: '338516' }) .then((res) => { const checkoutUrl = res.data.data.attributes.url; window.LemonSqueezy.Url.Open(checkoutUrl); }) .catch(() => { AppToaster.show({ message: 'Something went wrong!', intent: Intent.DANGER, }); }); }; return ( {featured && Most Popular} Subscribe {features?.map((feature) => ( {feature} ))} ); } export function SubscriptionPlans({ plans }) { return ( {plans.map((plan, index) => ( ))} ); }