<pad-utility-style href="../Styles/blockWithStyling.css"/>
<article class="pad-course-list-item pad-block-with-styling pad-course pad-card">
    <header class="pad-course-header">
        <!-- Titel -->
        <div class="pad-title">
            <pad-if _:if:_="availableSpots" equals="0" not>
                <pad-course-detail_link pad-template="linkOnly">
                    <h5>
                        {{course->name}}
                    </h5>
                </pad-course-detail_link>
            </pad-if>

            <pad-if _:if:_="availableSpots" equals="0">
                <h5>
                    {{course->name}} {{_"Cursus is vol"}}
                </h5>
            </pad-if>
        </div>

        <!-- Datum -->
        <div class="pad-start-date">
            <i class="fas fa-calendar"></i> <pad-utility-date _:time:_="course->earliestDayPart->startTime" fallback="-"/>
        </div>

        <!-- Locatie -->
        <pad-if _:if:_="config->showLocation">
            <div class="pad-location" title="{{_'cursus start in deze plaats'}}">
                <pad-if _:if:_="config->showIcons">
                    <i class="fas fa-map-marker-alt"></i>
                </pad-if>
                <pad-if _:if:_="course->earliestDayPart->locations->0">
                    <pad-utility-user_text_template _:data:_="locationTemplateData" _:template:_="config->locationTemplate"/>
                </pad-if>
                <pad-if _:if:_="course->earliestDayPart->locations->0" not>
                    -
                </pad-if>
            </div>
        </pad-if>

        <!-- Price -->
        <pad-if _:if:_="config->showPrice">
            <div class="pad-price" title="{{_'prijs per persoon'}}">
                <pad-utility-price _:data:_="course->costsData" both="0" pp="1" _:tax:_="config->withTax"/>
            </div>
        </pad-if>
    </header>
    <div class="pad-course-body">
        <!-- Costs Remark -->
        <pad-if _:if:_="config->showCostRemark">
            <div class="pad-costs-remarks">
                {{course->costsData->remark}}
            </div>
        </pad-if>

        <!-- Dagdelen -->
        <pad-if _:if:_="config->showDayParts" _:if-1:_="course->dayParts">
            <div class="pad-daypart-list">
                <ul class="pad-detail-dayparts">
                    <pad-for _:in:_="course->dayParts" as="dayPart">
                        <pad-day_part-list_item _:day-part:_="dayPart" pad-template="blockWithStyling"/>
                    </pad-for>
                </ul>
            </div>
        </pad-if>

        <!-- Omschrijving -->
        <pad-if _:if:_="config->showDescription">
            <div class="pad-description">
                {{description}}
            </div>
        </pad-if>

        <!-- Tags -->
        <pad-utility-style selected-style="tags"/>
        <div class="pad-tags">
            <pad-if _:if:_="config->showStartGuaranteed" _:if-1:_="course->startGuaranteed">
                <div class="pad-tag pad-start-guaranteed" title="{{_'heeft startgarantie'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-check"></i>
                    </pad-if>
                    {{_"Startgarantie"}}
                </div>
            </pad-if>

            <pad-if _:if:_="availableSpots" equals="0">
                <div class="pad-tag pad-full">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-exclamation-triangle"></i>
                    </pad-if>
                    {{_"Cursus is vol"}}
                </div>
            </pad-if>

            <pad-if _:if:_="config->showDayPartsCount">
                <div class="pad-tag pad-dayparts" title="{{_'cursus bestaat uit zoveel delen'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-recycle"></i>
                    </pad-if>
                    <pad-course-day_part_amount _:include-e-learning:_="config->includeELearningDayParts" /> {{config->dayPartText}}
                </div>
            </pad-if>

            <pad-if _:if:_="config->showELearning" _:if-2:_="course->hasELearning">
                <div class="pad-tag pad-courseelearning" title="{{_'cursus bevat elearning'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-book"></i>
                    </pad-if>
                    {{_"e-learning"}}
                </div>
            </pad-if>

            <pad-if _:if:_="config->showAvailableSpots">
                <div class="pad-tag pad-available" title="{{_'plaatsen beschikbaar'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-user-cog"></i>
                    </pad-if>
                    {{availableSpots}} {{_"beschikbaar"}}
                </div>
            </pad-if>

            <pad-if _:if:_="config->showMoneyBack" _:if-1:_="course->moneyBackGuaranteed">
                <div class="pad-tag pad-money-guaranteed" title="{{_'niet goed, geld terug garantie!'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-money-bill-alt"></i>
                    </pad-if>
                    {{_"Geld terug garantie"}}
                </div>
            </pad-if>

            <pad-if _:if:_="config->showCode95" _:if-1:_="course->hasCode95">
                <div class="pad-tag pad-code95" title="{{_'cursus heeft code95'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-clock fa-fw"></i>
                    </pad-if>
                    {{_"Code95"}}
                </div>
            </pad-if>

            <pad-if _:if:_="config->showSoob" _:if-1:_="course->hasSoob">
                <div class="pad-tag pad-soob" title="{{_'cursus heeft SOOB subsidie'}}">
                    <pad-if _:if:_="config->showIcons">
                        <i class="fas fa-truck fa-fw"></i>
                    </pad-if>
                    {{_"SOOB subsidie"}}
                </div>
            </pad-if>

            <!-- Labels -->
            <pad-if _:if:_="config->showLabels" _:if-1:_="course->labels">
                <pad-for _:in:_="course->labels" as="label">
                    <div class="pad-label pad-tag">
                        <pad-if _:if:_="config->showIcons">
                            <i class="fas fa-tag"></i>
                        </pad-if>
                        {{label}}
                    </div>
                </pad-for>
            </pad-if>
        </div>

        <!-- Detailknop -->
        <pad-if _:if:_="config->showDetailButton" _:if-2:_="availableSpots">
            <div class="pad-detail-button" title="{{_'Bekijk details van deze cursus'}}">
                <pad-course-detail_link pad-template="styledButton"/>
            </div>
        </pad-if>
    </div>
</article>
