// Rôle : rend le formulaire et la liste des comptes à rebours timer. import { useState } from "react"; import { Icon } from "../../../components/Icon.jsx"; import { formatTargetTime } from "./timerUtils.js"; import { AUTO_REFRESH_COUNTDOWN_TYPES, TOGGLE_REFRESH_COUNTDOWN_TYPES, canToggleAutoRefresh, getAlertGuardMessage, getCountdownMetaParts, handleEditableKeyDown, isAlertGuarded } from "./timerOptions.js"; import { EditableTimerLabel, TimerAlertModeSwitch, TimerValue, TimePartsInput } from "./TimerSharedControls.jsx"; export function CountdownControls({ textContent, form, error, onChange, onSubmit }) { return (
{form.type === "duration" && ( )} {form.type === "daily_time" && ( )} {form.type === "time_pattern" && ( )} {form.type === "interval" && (
)} {error && ( )}
); } export function CountdownList({ countdowns, nowMs, textContent, reorder, reorderEnabled, parentId, onRename, onAlertModeChange, onReset, onAutoRefreshToggle, onDelete }) { const [editingId, setEditingId] = useState(""); if (!countdowns.length) return

{textContent.emptyCountdowns || "Aucun compte à rebours configuré."}

; return (