import React from 'react';
import { ArrowRight, TrendingUp, Clock, DollarSign, Users } from 'lucide-react';
/**
* DashboardTile Component
* Tile-based navigation for dashboards
*/
export default function DashboardTile({
id,
title,
metric,
context,
summary,
discomfort,
icon: Icon,
onClick
}) {
const getDiscomfortColor = (score) => {
if (score >= 9) return '#D85A30';
if (score >= 7) return '#BA7517';
return '#888';
};
return (
onClick(id)}
style={{
background: 'white',
border: '1px solid #eee',
borderRadius: 12,
padding: 18,
cursor: 'pointer',
transition: 'all 0.2s ease',
position: 'relative',
overflow: 'hidden'
}}
onMouseEnter={(e) => {
e.currentTarget.style.boxShadow = '0 4px 12px rgba(0,0,0,0.1)';
e.currentTarget.style.transform = 'translateY(-2px)';
}}
onMouseLeave={(e) => {
e.currentTarget.style.boxShadow = 'none';
e.currentTarget.style.transform = 'translateY(0)';
}}
>
{/* Discomfort indicator */}
{/* Icon */}
{Icon && (
)}
{/* Title */}
{title}
{/* Metrics */}
{/* Summary */}
{summary}
{/* Footer */}
{discomfort >= 9 ? '⚠️ High Impact' : discomfort >= 7 ? '⚡ Medium Impact' : '📊 Analysis'}
);
}
/**
* DashboardGrid Component
* Grid layout for dashboard tiles
*/
export function DashboardGrid({ dashboards, onNavigate }) {
const icons = [TrendingUp, Clock, DollarSign, Users];
return (
{dashboards.map((dashboard, i) => (
))}
);
}