<div class="datepicker datepicker-inline">
    {{#if viewingDays}}
        <div class="datepicker-days">
            <table class="table-condensed">
                <thead>
                    <tr>
                        <th {{action "changeMonth" -1}}>
                            <span class="sl-icon-previous">previous month</span>
                        </th>
                        <th {{action "setView" "months"}} class="datepicker-switch" colspan="5">
                            {{currentMonthString}} {{currentYear}}
                        </th>
                        <th {{action "changeMonth" 1}}>
                            <span class="sl-icon-next">next month</span>
                        </th>
                    </tr>
                    <tr>
                        {{#each shortWeekDayNames as |dayName|}}
                            <th class="dow">{{dayName}}</th>
                        {{/each}}
                    </tr>
                </thead>
                <tbody>
                    {{#each weeksInMonthView as |weekDays|}}
                        <tr>
                            {{#each weekDays as |day|}}
                                {{sl-calendar-day
                                    action="sendDateContent"
                                    active=day.active
                                    content=day.content
                                    day=day.day
                                    new=day.new
                                    old=day.old
                                }}
                            {{/each}}
                        </tr>
                    {{/each}}
                </tbody>
            </table>
        </div>
    {{/if}}

    {{#if viewingMonths}}
        <div class="datepicker-months">
            <table class="table-condensed">
                <thead>
                    <tr>
                        <th {{action "changeYear" -1}}>
                            <span class="sl-icon-previous">previous year</span>
                        </th>
                        <th {{action "setView" "years"}} class="datepicker-switch" colspan="5">
                            {{currentYear}}
                        </th>
                        <th {{action "changeYear" 1}}>
                            <span class="sl-icon-next">next year</span>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td colspan="7">
                            {{#each monthsInYearView as |month|}}
                                {{sl-calendar-month
                                    action="setMonth"
                                    active=month.active
                                    locale=locale
                                    month=month.month
                                }}
                            {{/each}}
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    {{/if}}

    {{#if viewingYears}}
        <div class="datepicker-years">
            <table class="table-condensed">
                <thead>
                    <tr>
                        <th {{action "changeDecade" -1}}>
                            <span class="sl-icon-previous">previous decade</span>
                        </th>
                        <th class="datepicker-switch" colspan="5">
                            {{decadeStart}}-{{decadeEnd}}
                        </th>
                        <th {{action "changeDecade" 1}}>
                            <span class="sl-icon-next">next decade</span>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td colspan="7">
                            {{#each yearsInDecadeView as |year|}}
                                {{sl-calendar-year
                                    action="setYear"
                                    active=year.active
                                    old=year.old
                                    new=year.new
                                    year=year.year
                                }}
                            {{/each}}
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    {{/if}}
</div>
