/** * DOM references and shared application state. */ /** @type {HTMLDivElement|null} */ export const calendarEl = document.getElementById("calendar"); /** @type {HTMLElement|null} */ export const monthTitleEl = document.getElementById("monthTitle"); /** @type {HTMLDivElement|null} */ export const dutyListEl = document.getElementById("dutyList"); /** @type {HTMLElement|null} */ export const loadingEl = document.getElementById("loading"); /** @type {HTMLElement|null} */ export const errorEl = document.getElementById("error"); /** @type {HTMLElement|null} */ export const accessDeniedEl = document.getElementById("accessDenied"); /** @type {HTMLElement|null} */ export const headerEl = document.querySelector(".header"); /** @type {HTMLElement|null} */ export const weekdaysEl = document.querySelector(".weekdays"); /** @type {HTMLButtonElement|null} */ export const prevBtn = document.getElementById("prevMonth"); /** @type {HTMLButtonElement|null} */ export const nextBtn = document.getElementById("nextMonth"); /** Currently viewed month (mutable). */ export const state = { /** @type {Date} */ current: new Date(), /** @type {object[]} */ lastDutiesForList: [], /** @type {ReturnType|null} */ todayRefreshInterval: null, /** @type {'ru'|'en'} */ lang: "ru" };