import { state } from '../state.js';
import { escapeHtml } from '../utils.js';
import { showModal, closeModal } from './modal-base.js';
import { getExerciseSummary } from '../logic/exercise.js';
import { showChartDialog } from './chart-modal.js';
const fmtDate = d => new Date(d).toLocaleDateString('ru-RU');
/**
* Страница-сводка по упражнению: рекорды, средние за тренировку и за всё
* время, синергичные упражнения и максимальный вес среди них.
*/
export function showExerciseSummary(exerciseName, clientId = null) {
const s = getExerciseSummary(exerciseName, clientId);
if (!s.days) {
showModal(`