"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const Dashboard = (0, react_1.memo)(({ title, children, footer, className = '', ariaLabel = 'Dashboard', zIndex = 1050, onMetricClick, onRefresh, initialPageSize = 10 }) => {
    // Mock data for demonstration
    const metrics = [
        { id: '1', title: 'Users', value: '1,234', icon: 'users' },
        { id: '2', title: 'Revenue', value: '$12,345', icon: 'dollar', trend: 5.2 },
        { id: '3', title: 'Orders', value: '567', icon: 'shopping-cart', trend: -2.1 },
        { id: '4', title: 'Sessions', value: '8,901', icon: 'activity' }
    ];
    const activities = [
        { timestamp: '2024-01-15T10:30:00Z', type: 'info', description: 'New user registration' },
        { timestamp: '2024-01-15T10:25:00Z', type: 'success', description: 'Payment processed' },
        { timestamp: '2024-01-15T10:20:00Z', type: 'warning', description: 'High memory usage' }
    ];
    const handleRefresh = () => {
        if (onRefresh) {
            onRefresh();
        }
    };
    const handleMetricClick = (metric) => {
        if (onMetricClick) {
            onMetricClick(metric);
        }
    };
    return ((0, jsx_runtime_1.jsxs)("div", { className: `bf-dashboard ${className}`, "aria-label": ariaLabel, style: { zIndex }, children: [title && (0, jsx_runtime_1.jsx)("h2", { className: "bf-dashboard-title", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "bf-dashboard-body", children: (0, jsx_runtime_1.jsxs)("div", { className: "dashboard", children: [(0, jsx_runtime_1.jsxs)("div", { className: "dashboard-header", children: [(0, jsx_runtime_1.jsxs)("h1", { children: ["Acme Corporation Dashboard", (0, jsx_runtime_1.jsx)("span", { className: "badge badge-info", style: { marginLeft: '8px' }, children: "Live" })] }), (0, jsx_runtime_1.jsx)("div", { className: "dashboard-actions", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: handleRefresh, title: "Refresh dashboard data", className: "btn btn-icon", children: "\uD83D\uDD04" }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "dashboard-grid", style: { display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '16px', marginBottom: '24px' }, children: metrics.map((metric) => ((0, jsx_runtime_1.jsxs)("div", { className: "metric-card", onClick: () => handleMetricClick(metric), style: {
                                    padding: '16px',
                                    border: '1px solid #e0e0e0',
                                    borderRadius: '8px',
                                    cursor: 'pointer',
                                    backgroundColor: '#fff'
                                }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "metric-header", children: [(0, jsx_runtime_1.jsx)("span", { className: "metric-icon", children: metric.icon }), (0, jsx_runtime_1.jsx)("h3", { className: "metric-title", children: metric.title })] }), (0, jsx_runtime_1.jsxs)("div", { className: "metric-value", children: [(0, jsx_runtime_1.jsx)("span", { className: "value", children: metric.value }), metric.trend && ((0, jsx_runtime_1.jsxs)("span", { className: `trend ${metric.trend > 0 ? "up" : "down"}`, children: [metric.trend > 0 ? "↑" : "↓", " ", Math.abs(metric.trend), "%"] }))] })] }, metric.id))) }), (0, jsx_runtime_1.jsxs)("div", { className: "activities-section", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Recent Activities" }), (0, jsx_runtime_1.jsx)("div", { className: "activities-list", children: activities.map((activity, index) => ((0, jsx_runtime_1.jsxs)("div", { className: `activity-item activity-${activity.type}`, children: [(0, jsx_runtime_1.jsx)("span", { className: "activity-time", children: new Date(activity.timestamp).toLocaleString() }), (0, jsx_runtime_1.jsx)("span", { className: `activity-type activity-${activity.type}`, children: activity.type }), (0, jsx_runtime_1.jsx)("span", { className: "activity-description", children: activity.description })] }, index))) })] }), children] }) }), footer && (0, jsx_runtime_1.jsx)("div", { className: "bf-dashboard-footer", children: footer })] }));
});
Dashboard.displayName = 'Dashboard';
exports.default = Dashboard;
//# sourceMappingURL=Dashboard.js.map