\n ${createControls(month, year, options)}\n
\n ${createViewTemplate(\n date,\n year,\n selectedDate,\n selectedYear,\n selectedMonth,\n options,\n monthsInRow,\n yearsInView,\n yearsInRow\n )}\n
\n ${createFooter(options)}\n
\n `;\n\n return mainContentTemplate;\n}\n\nfunction createViewTemplate(\n date,\n year,\n selectedDate,\n selectedYear,\n selectedMonth,\n options,\n monthsInRow,\n yearsInView,\n yearsInRow\n) {\n let viewTemplate;\n if (options.view === 'days') {\n viewTemplate = createDayViewTemplate(date, selectedDate, options);\n } else if (options.view === 'months') {\n viewTemplate = createMonthViewTemplate(year, selectedYear, selectedMonth, options, monthsInRow);\n } else {\n viewTemplate = createYearViewTemplate(date, selectedYear, options, yearsInView, yearsInRow);\n }\n\n return viewTemplate;\n}\n\nfunction createControls(month, year, options) {\n return `\n