﻿@using Leica.Spider.BusinessCenter.Frontend.Utils
@* Keep this in template in sync with the one in the Main area where we have slighly different structure due to styling of the SmartAdmin template *@

@Scripts.Render("~/bundles/RegionSelector")
@Styles.Render("~/Content/RegionSelector")
<script type="text/x-handlebars-template"
        id="regionsTemplate">
    <div class="regionSelector">
        <input type="hidden" name="{{selectedRegionsInputName}}" />

        <div class="regionPerSubscription">
            <label asp-for="RegionsPerSubscription">@Lang.Html("IDS_USER_REGIONSELECTOR_REGIONSPERSUBSCRIPTION_LABEL")</label>
            <input type="text" name="{{regionsPerSubscriptionInputName}}" value="{{regionsPerSubscription}}">
        </div>

        <div class="regionSelectorLabels">
            <div class="regionMapWrapper">
                <div class="selectRegionLabel">
                    <label></label>
                </div>
            </div>
            <div class="regionListWrapper">
                <div class="regionsSelectionAndUnselection">
                    <a class="selectAllRegions" href="#">@Lang.Html("IDS_REGIONS_VIEW_SELECT_ALL_LABEL")</a>/
                    <a class="unselectAllRegions" href="#">@Lang.Html("IDS_REGIONS_VIEW_UNSELECT_LABEL")</a>
                </div>
            </div>
        </div>
        <div class="regionSelectorSelectionControls">
            <div class="regionMapWrapper">
                <div class="map regionMap"></div>
            </div>
            <div class="regionListWrapper">
                <div class="regionList">
                    {{#each regions}}
                    <div class="regionsWithCheckboxes">
                        <div class="checkbox editCheckbox">
                            <input type="checkbox" class="regionCheckBox editButton" value="{{Id}}" />
                            <label class="regionNameLabel">{{Name}}</label>
                        </div>
                    </div>
                    {{/each}}
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/javascript">
    var Localisation_Select_Region = @Lang.JsString("IDS_SHOP_REGIONSELECTOR_SELECT_LABEL");
</script>
