import React from 'react' // ─── StatCard ───────────────────────────────────────────────────────────────── type IconGradient = 'teal' | 'green' | 'amber' | 'red' type ChangeType = 'positive' | 'negative' | 'neutral' const gradientClass: Record = { teal: 'from-teal-400 to-teal-500', green: 'from-green-400 to-green-500', amber: 'from-amber-400 to-amber-500', red: 'from-red-400 to-red-500', } const changeClass: Record = { positive: 'text-green-500', negative: 'text-red-500', neutral: 'text-slate-400', } export interface StatCardProps { icon: string iconGradient?: IconGradient label: string value: string | number change?: string | number changeType?: ChangeType progress?: number className?: string } export const StatCard: React.FC = ({ icon, iconGradient = 'teal', label, value, change, changeType = 'neutral', progress, className = '', }) => (
{icon}

{label}

{value} {change != null && ( {change} )}

{progress != null && (
)}
) // ─── ToolCard ───────────────────────────────────────────────────────────────── import type { BadgeStatus as BadgeStatusType } from './Badge' import { BadgeStatus } from './Badge' const statusLabel: Record = { active: '활성', 'in-progress': '진행 중', pending: '대기', error: '오류', inactive: '비활성', } export interface ToolCardProps { icon: string status?: BadgeStatusType title: string description?: string tags?: string[] onClick?: () => void className?: string } export const ToolCard: React.FC = ({ icon, status, title, description, tags, onClick, className = '', }) => (
{icon}
{status && ( {statusLabel[status]} )}

{title}

{description && (

{description}

)} {tags && tags.length > 0 && (
{tags.map((tag) => ( {tag} ))}
)}
) // ─── EmptyCard ──────────────────────────────────────────────────────────────── export interface EmptyCardProps { icon?: string label?: string description?: string onClick?: () => void minHeight?: string className?: string } export const EmptyCard: React.FC = ({ icon = 'add', label = '새 항목 등록', description = '클릭하여 추가', onClick, minHeight = 'min-h-[160px]', className = '', }) => (
{icon}

{label}

{description && (

{description}

)}
)