'use client' import type { App } from '@/models/explore' import type { TryAppSelection } from '@/types/try-app' import { PlusIcon } from '@heroicons/react/20/solid' import { RiInformation2Line } from '@remixicon/react' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' import { useGlobalPublicStore } from '@/context/global-public-context' import { AppModeEnum } from '@/types/app' import { cn } from '@/utils/classnames' import { AppTypeIcon } from '../../app/type-selector' import Button from '../../base/button' export type AppCardProps = { app: App canCreate: boolean onCreate: () => void onTry: (params: TryAppSelection) => void isExplore?: boolean } const AppCard = ({ app, canCreate, onCreate, onTry, isExplore = true, }: AppCardProps) => { const { t } = useTranslation() const { app: appBasicInfo } = app const { systemFeatures } = useGlobalPublicStore() const isTrialApp = app.can_trial && systemFeatures.enable_trial_app const handleTryApp = () => { onTry({ appId: app.app_id, app }) } return (