/**
* DashboardPageFree.tsx
*
* FREE edition: React component for dashboard-page.
* Data is injected by PHP via wp_localize_script into window.pdfibDashboardData.
* NOTE: No premium badges, no upgrade prompts, no pricing sections.
*/
import React from 'react';
import type { DashboardData } from './DashboardPage';
declare global {
interface Window {
pdfibDashboardData?: DashboardData;
}
}
const StatCard: React.FC<{ value: number; label: string }> = ({ value, label }) => (
{value.toLocaleString()}
{label}
);
interface GuideStepProps {
number: number;
title: string;
desc: string;
hint: string;
url: string;
}
const GuideStep: React.FC = ({ number, title, desc, hint, url }) => (
{number}
);
const DashboardPageFree: React.FC = () => {
const data = window.pdfibDashboardData;
if (!data) {
return (
ERREUR: window.pdfibDashboardData est undefined.
);
}
const { stats, pluginVersion, date, urls, i18n } = data;
return (
{/* Header */}
Advanced PDF Invoice Builder
{i18n.subtitle}
{i18n.version.replace('%s', pluginVersion)}
{i18n.lastUpdate.replace('%s', date)}
{/* Stats */}
{/* Action cards */}
{/* Quick-start guide */}
{i18n.guideTitle}
{i18n.steps.map((step, idx) => (
))}
);
};
export default DashboardPageFree;