import { dispatch, upgrade } from '../../../../node_modules/@browserkids/dom/index.js'; export default class CalendarLegend extends HTMLElement { constructor() { super(); upgrade(this, ` `); } async onPostUpdate({ detail }) { const { selectedMonth } = detail; const { calendar, preferences } = window; const { $content } = this.$refs; $content.textContent = await calendar.getDate({ date: selectedMonth, format: await preferences.get('calendarLegendFormat'), }); dispatch(this, 'postrender'); } }