@use '../../base' as *;
@use 'sass:string';

/// @access private
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
@mixin component {
    @include b(igx-calendar) {
        $this: bem--selector-to-string(&);
        @include register-component(
            $name: string.slice($this, 2, -1),
            $deps: (
                igx-icon,
            )
        );

        @extend %calendar !optional;

        @include e(header) {
            @extend %header-display !optional;
        }

        @include e(wrapper) {
            @extend %calendar-wrapper !optional;
        }

        @include e(wrapper, $m: 'vertical') {
            @extend %calendar-wrapper--vertical !optional;
        }

        @include e(pickers) {
            @extend %pickers-display !optional;
        }

        @include e(pickers, $m: 'vertical') {
            @extend %pickers-display--vertical !optional;
        }

        @include e(pickers, $m: 'days') {
            @extend %pickers-display--days !optional;
        }

        @include e(body) {
            @extend %body-display !optional;
        }

        @include e(body, $m: 'vertical') {
            @extend %body-display--vertical !optional;
        }

        @include e(header-year) {
            @extend %header-year !optional;
        }

        @include e(header-date) {
            @extend %header-date !optional;
        }

        @include m(vertical) {
            @extend %calendar !optional;
            @extend %calendar-vertical !optional;

            @include e(header) {
                @extend %header-display-vertical !optional;
            }

            @include e(header-date) {
                @extend %header-date !optional;
                @extend %header-date-vertical !optional;
            }
        }

        @include e(aria-off-screen) {
            @extend %calendar__aria-off-screen !optional;
        }
    }

    @include b(igx-calendar-picker) {
        @extend %views-navigation !optional;

        @include e(dates) {
            @extend %picker-dates !optional;
        }

        @include e(nav) {
            @extend %picker__nav !optional;
        }

        @include e(date) {
            @extend %picker-date !optional;
        }

        @include e(prev) {
            @extend %picker-arrow !optional;
        }

        @include e(next) {
            @extend %picker-arrow !optional;
        }
    }

    @include b(igx-days-view) {
        @extend %calendar !optional;
        @extend %days-view !optional;

        @include e(grid) {
            @extend %days-view-grid !optional;
        }

        @include e(row) {
            @extend %days-view-row !optional;
        }

        @include e(date) {
            @extend %date !optional;
        }

        @include e(date-inner) {
            @extend %date-inner !optional;
        }

        @include e(date, 'week-number') {
            @extend %date-week-number !optional;
        }

        @include e(date, 'inactive') {
            @extend %date-inactive !optional;
        }

        @include e(date, $mods: ('inactive', 'special')) {
            @extend %date-inactive-special !optional;
        }

        @include e(date, 'active') {
            @extend %date-active !optional;
        }

        @include e(date, 'selected') {
            @extend %date-selected !optional;
        }

        @include e(date, $mods: ('selected', 'active')) {
            @extend %date-selected-active !optional;
        }

        @include e(date, $mods: ('selected', 'special')) {
            @extend %date-selected-special !optional;
        }

        @include e(date, $mods: ('selected', 'special', 'active')) {
            @extend %date-selected-special-active !optional;
        }

        @include e(date, $mods: ('selected', 'range')) {
            @extend %date-selected-range !optional;
        }

        @include e(date, $mods: ('selected', 'special','range')) {
            @extend %date-selected-special-range !optional;
        }

        @include e(date, $mods: ('selected', 'special', 'active', 'range')) {
            @extend %date-selected-special-range !optional;
            @extend %date-selected-special-range-active !optional;
        }

        @include e(date, 'hidden') {
            @extend %date-hidden !optional;
        }

        @include e(date, 'range') {
            @extend %date-range !optional;

            &:hover {
                @extend %date-range-hover !optional;
            }
        }

        @include e(date, 'range-preview') {
            @extend %date-range-preview !optional;
        }

        @include e(date, $mods: ('range-preview', 'current')) {
            @extend %date-range-preview-current !optional;
        }

        @include e(date, $mods: ('range-preview', 'special')) {
            @extend %date-range-preview-special !optional;
        }

        @include e(date, $mods: ('range-preview', 'special', 'current')) {
            @extend %date-range-preview-special-current !optional;
        }

        @include e(date, $mods: ('range', 'selected')) {
            @extend %date-range-selected !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'first')) {
            @extend %date-range-selected-first !optional;
        }

        @include e(date, $mods: ('first', 'last')) {
            @extend %date-first-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'first')) {
            @extend %date-range-selected-current-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'special', 'first')) {
            @extend %date-range-selected-special-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'last')) {
            @extend %date-range-selected-current-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'last')) {
            @extend %date-range-selected-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'special', 'last')) {
            @extend %date-range-selected-special-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'special', 'first', 'last')) {
            @extend %date-selected-special-first-last !optional;
        }

        @include e(date, $mods: ('selected', 'special', 'current', 'first', 'last')) {
            @extend %date-selected-special-current-first-last !optional;
        }

        @include e(date, $mods: ('selected', 'special', 'current', 'preview', 'first')) {
            @extend %date-selected-special-current-last !optional;
        }

        @include e(date, $mods: ('selected', 'special', 'current', 'preview', 'last')) {
            @extend %date-selected-special-current-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'active')) {
            @extend %date-range-selected-active !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'active', 'first')) {
            @extend %date-range-selected-active-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'active', 'last')) {
            @extend %date-range-selected-active-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current')) {
            @extend %date-selected-current-range !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'active')) {
            @extend %date-selected-current-range-active !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'special')) {
            @extend %date-selected-current-range-special !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'special', 'active')) {
            @extend %date-selected-current-range-special-active !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'first')) {
            @extend %date-selected-current-range-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'last')) {
            @extend %date-selected-current-range-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'first', 'special')) {
            @extend %date-selected-current-range-special-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'first', 'special', 'active')) {
            @extend %date-selected-current-range-special-active-first !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'last', 'special')) {
            @extend %date-selected-current-range-special-last !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'current', 'last', 'special', 'active')) {
            @extend %date-selected-current-range-special-active-last !optional;
        }

        @include e(date, 'weekend') {
            @extend %date-weekend !optional;
        }

        @include e(date, 'current') {
            @extend %date-current !optional;
        }

        @include e(date, $mods: ('current', 'active')) {
            @extend %date-current-active !optional;
        }

        @include e(date, $mods: ('current', 'range')) {
            @extend %date-current-range !optional;
        }

        @include e(date, $mods: ('current', 'selected')) {
            @extend %date-selected-current !optional;
        }

        @include e(date, $mods: ('current', 'selected', 'active')) {
            @extend %date-selected-current-active !optional;
        }

        @include e(date, $mods: ('current', 'selected', 'special')) {
            @extend %date-selected-current-special !optional;
        }

        @include e(date, $mods: ('current', 'selected', 'special', 'active')) {
            @extend %date-selected-current-special-active !optional;
        }

        @include e(date, 'special') {
            @extend %date-special !optional;
        }

        @include e(date, $mods: ('special', 'current')) {
            @extend %date-special-current !optional;
        }

        @include e(date, $mods: ('special', 'current', 'selected')) {
            @extend %date-special-current-selected !optional;
        }

        @include e(date, $mods: ('special', 'current', 'selected', 'active')) {
            @extend %date-special-current-selected-active !optional;
        }

        @include e(date, $mods: ('special' 'active')) {
            @extend %date-special-active !optional;
        }

        @include e(date, $mods: ('special', 'current', 'active')) {
            @extend %date-special-current !optional;
            @extend %date-special-current-active !optional;
        }

        @include e(date, $mods: ('special', 'current', 'active', 'range')) {
            @extend %date-special-current !optional;
            @extend %date-special-current-active !optional;
        }

        @include e(date, 'first') {
            @extend %date-first !optional;
        }

        @include e(date, $mods: ('first', 'range-preview')) {
            @extend %date-first-preview !optional;
        }

        @include e(date, $mods: ('last', 'range-preview')) {
            @extend %date-last-preview !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'selected')) {
            @extend %date-first-preview-selected !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'current', 'selected')) {
            @extend %date-first-preview-current-selected !optional;
        }

        @include e(date, $mods: ('last', 'range-preview', 'selected')) {
            @extend %date-last-preview-selected !optional;
        }

        @include e(date, $mods: ('last', 'range-preview',  'current', 'selected')) {
            @extend %date-last-preview-current-selected !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'special')) {
            @extend %date-first-preview-special !optional;
        }

        @include e(date, $mods: ('last', 'range-preview', 'special')) {
            @extend %date-last-preview-special !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'special', 'current')) {
            @extend %date-first-preview-special-current !optional;
        }

        @include e(date, $mods: ('last', 'range-preview', 'special', 'current')) {
            @extend %date-last-preview-special-current !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'special', 'active')) {
            @extend %date-first-preview-special-active !optional;
        }

        @include e(date, $mods: ('last', 'range-preview', 'special', 'active')) {
            @extend %date-last-preview-special-active !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'special', 'active', 'selected')) {
            @extend %date-first-preview-special-active-selected !optional;
        }

        @include e(date, $mods: ('last', 'range-preview', 'special', 'active', 'selected')) {
            @extend %date-last-preview-special-active-selected !optional;
        }

        @include e(date, $mods: ('first', 'range-preview', 'special', 'active', 'current')) {
            @extend %date-first-preview-special-active-current !optional;
        }

        @include e(date, $mods: ('last', 'range-preview', 'special', 'active', 'current')) {
            @extend %date-last-preview-special-active-current !optional;
        }

        @include e(date, 'last') {
            @extend %date-last !optional;
        }

        @include e(label) {
            @extend %date !optional;
            @extend %weekday-label !optional;
        }

        @include e(label-inner) {
            @extend %weekday-label-inner !optional;
        }

        @include e(label, 'week-number') {
            @extend %label-week-number !optional;
        }

        @include e(date-inner, 'week-number') {
            @extend %date-inner-week-number !optional;
        }

        @include e(date, 'disabled') {
            @extend %date-disabled !optional;
        }

        @include e(date, $mods: ('disabled', 'range')) {
            @extend %date-disabled-range !optional;
        }

        @include e(date, $mods: ('disabled', 'range-preview')) {
            @extend %date-disabled-range-preview !optional;
        }

        @include e(date, $mods: ('disabled', 'special')) {
            @extend %date-disabled-special !optional;
        }

        @include e(date, $mods: ('disabled', 'special', 'selected')) {
            @extend %date-disabled-special-selected !optional;
        }

        @include e(date, $mods: ('disabled', 'selected')) {
            @extend %date-disabled-selected !optional;
        }

        @include e(date, $mods: ('disabled', 'current')) {
            @extend %date-disabled-current !optional;
        }

        @include e(date, $mods: ('disabled', 'current', 'special')) {
            @extend %date-disabled-current-special !optional;
        }

        @include e(date, $mods: ('disabled', 'single', 'current', 'special', 'selected')) {
            @extend %date-disabled-current-special-selected !optional;
        }

        @include e(date, $mods: ('disabled', 'current', 'selected')) {
            @extend %date-disabled-current-selected !optional;
        }

        @include e(date, $mods: ('disabled', 'inactive')) {
            @extend %date-disabled-inactive !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'first', 'disabled')) {
            @extend %date-range-selected-first-disabled !optional;
        }

        @include e(date, $mods: ('range', 'selected', 'last', 'disabled')) {
            @extend %date-range-selected-first-disabled !optional;
        }
    }

    @include b(igx-calendar-view) {
        @extend %calendar-view !optional;

        @include e(items) {
            @extend %calendar-items !optional;
        }

        @include e(item) {
            @extend %view-item !optional;
        }

        @include e(item, 'current') {
            @extend %calendar-view__item-current !optional;
        }

        @include e(item, $mods: ('current', 'active')) {
            @extend %calendar-view__item-current-active !optional;
        }

        @include e(item, 'selected') {
            @extend %calendar-view__item-selected !optional;
        }

        @include e(item, $mods: ('selected', 'active')) {
            @extend %calendar-view__item-selected-active !optional;
        }

        @include e(item, $mods: ('selected', 'current')) {
            @extend %calendar-view__item-selected-current !optional;
        }

        @include e(item, $mods: ('selected', 'current', 'active')) {
            @extend %calendar-view__item-selected-current-active !optional;
        }

        @include e(item-inner) {
            @extend %calendar-view__item-inner !optional;

            &:hover {
                @extend %calendar-view__item-inner-hover !optional;
            }
        }
    }

    @include b(igx-month-picker) {
        @extend %month-picker !optional;
    }
}
