import { Badge, Box, Button, Flex, IconButton, Image, Link, List, ListIcon, ListItem, Text, useBreakpointValue, } from '@metafam/ds'; import { useRouter } from 'next/router'; import React from 'react'; import { BsFillCheckCircleFill } from 'react-icons/bs'; import { FaCircle } from 'react-icons/fa'; import { MdChevronRight } from 'react-icons/md'; import { Perk, PerkList } from './data'; interface PerksChecklistProps { perks: Perk[]; id: keyof Perk; altBackground?: boolean; } interface CardProps { title?: string; type?: string; image?: string; price?: string; id?: keyof Perk; description?: string; action?: string; list?: Perk[]; width?: string; background?: string; badgeColor?: string; route?: string; link?: string; recommended?: boolean; } export const RoleCard: React.FC = ({ title, image, description, recommended, action, route, link, }) => { const router = useRouter(); const isMobile = useBreakpointValue({ base: true, lg: false, }); return ( {title} {recommended && ( RECOMMENDED )} {isMobile && ( <> {route && ( router.push(route)} fontSize="4xl" icon={} /> )} {link && ( } /> )} )} {description && ( {description} )} {!isMobile && ( <> {route && ( )} {link && ( )} )} ); }; export const PerksCard: React.FC = ({ title, type, id, list, price, width = 'md', description, background, badgeColor, }) => { const isMobile = useBreakpointValue({ base: true, lg: false, }); return ( {title && !isMobile && ( {title} )} {price && ( {price} )} {description && ( {description} )} {type && ( {type} )} {list && list.length > 0 && ( {list?.map((item, idx) => ( {item.title} ))} )} ); }; export const PerksChecklist: React.FC = ({ perks, id, altBackground, }) => ( {id && ( { if (id === 'free') return 'green'; if (id === 'basic') return 'purple'; if (id === 'pro') return 'pink'; return 'gray'; })()} p={2} fontSize="0.4em" > {id} )} {perks?.map((perk, idx) => ( ))} );