\r\n ${createControls(month, year, options)}\r\n
\r\n ${createViewTemplate(\r\n date,\r\n year,\r\n selectedDate,\r\n selectedYear,\r\n selectedMonth,\r\n options,\r\n monthsInRow,\r\n yearsInView,\r\n yearsInRow\r\n )}\r\n
\r\n
\r\n `;\r\n } else {\r\n mainContentTemplate = `\r\n \r\n ${createControls(month, year, options)}\r\n
\r\n ${createViewTemplate(\r\n date,\r\n year,\r\n selectedDate,\r\n selectedYear,\r\n selectedMonth,\r\n options,\r\n monthsInRow,\r\n yearsInView,\r\n yearsInRow\r\n )}\r\n
\r\n ${createFooter(options)}\r\n
\r\n `;\r\n }\r\n\r\n return mainContentTemplate;\r\n}\r\n\r\nfunction createViewTemplate(\r\n date,\r\n year,\r\n selectedDate,\r\n selectedYear,\r\n selectedMonth,\r\n options,\r\n monthsInRow,\r\n yearsInView,\r\n yearsInRow\r\n) {\r\n let viewTemplate;\r\n if (options.view === 'days') {\r\n viewTemplate = createDayViewTemplate(date, selectedDate, options);\r\n } else if (options.view === 'months') {\r\n viewTemplate = createMonthViewTemplate(year, selectedYear, selectedMonth, options, monthsInRow);\r\n } else {\r\n viewTemplate = createYearViewTemplate(date, selectedYear, options, yearsInView, yearsInRow);\r\n }\r\n\r\n return viewTemplate;\r\n}\r\n\r\nfunction createControls(month, year, options) {\r\n return `\r\n \r\n
\r\n ${this._getMessageIcon()}\r\n ${this._options.message}\r\n
\r\n
\r\n ${this._cancelButtonTemplate}\r\n \r\n
\r\n
`;\r\n }\r\n\r\n _getConfig(config) {\r\n config = {\r\n ...Default,\r\n ...Manipulator.getDataAttributes(this._element),\r\n ...config,\r\n };\r\n typeCheckConfig(NAME, config, DefaultType);\r\n return config;\r\n }\r\n\r\n _getCancelButtonTemplate() {\r\n if (this._options.cancelText === '' || this._options.cancelText === ' ') {\r\n return '';\r\n }\r\n return `