@model IList<PrivacyPreferenceModel>
<b-modal ref="ModalPrivacyPreference" :dark-theme="darkMode" title="@Loc["PrivacyPreference.Center"]" id="ModalPrivacyPreference" centered hide-footer>
    <div class="alert">
        @Loc["PrivacyPreference.Description"]
    </div>
    @if (Model.Any())
    {
        <form id="frmPrivacyPreference">
            <div class="mt-3">
                @foreach (var item in Model)
                {
                    <div class="d-inline-flex align-items-start justify-content-between w-100 mb-3">
                        <div class="d-flex flex-column">
                            <div class="h5">@item.Name</div>
                            <div>@item.Description</div>
                        </div>
                        <div class="custom-control custom-switch">
                            <input @if (!(item.AllowToDisable)) { <text> disabled checked</text> } @if (item.State == true) { <text> checked</text> } type="checkbox"
                                   value="@item.SystemName" class="custom-control-input" id="ConsentCookies_@item.SystemName" name="ConsentCookies_@item.SystemName">
                            <label class="custom-control-label" for="ConsentCookies_@item.SystemName"></label>
                        </div>
                    </div>
                }
                <input type="button" class="btn btn-info w-100" @@click="$bvModal.hide('ModalPrivacyPreference');vm.savePrivacyPreference('@Url.RouteUrl("PrivacyPreference")')" value="Save" />
            </div>
        </form>
    }
</b-modal>
