// Rôle : affiche une date accessible dans l'administration Sokko TCG.
import { Tooltip } from "../../../components/Tooltip.jsx";
import { DATE_FORMATTER, SHORT_DATE_FORMATTER } from "./adminFormat.js";
// `relative` remplace le texte visible (« il y a 5 minutes ») ; la date complète reste en infobulle.
export function DateValue({ value, empty = "Aucun tirage", dateOnly = false, relative = null }) {
if (!value) return {empty};
const full = (dateOnly ? SHORT_DATE_FORMATTER : DATE_FORMATTER).format(value);
return {relative || full};
}