@{
    ViewData["Title"] = "Chat addons";
}

@model DeleteChatThemeBaseViewModel

<partial name="_TempDataPartial" />

<div class="container-fluid">
    <div class="d-sm-flex align-items-center justify-content-between mb-4">
        <h1 class="h3 mb-0 text-gray-800">Chat Addons - Delete existing chat theme</h1>
    </div>
    <hr />

    <div class="d-sm-flex align-items-center justify-content-between mb-4">
        <h1 class="h5 mb-0 text-gray-800">Delete existing chat theme</h1>
    </div>
    <form method="post">
        <div class="row">
            <div class="col-xl-12 col-md-12 mb-4">
                <label asp-for="@this.Model.DeleteChatThemeInputModel.Id"></label>
                <select class="form-control" asp-for="@this.Model.DeleteChatThemeInputModel.Id" onchange="selectedName(this)">
                    <option disabled selected>Select theme name...</option>
                    @foreach (var theme in this.Model.DeleteChatThemeViewModels)
                    {
                        <option value="@theme.Id">@theme.Name</option>
                    }
                </select>
                <span class="text-danger" asp-validation-for="@this.Model.DeleteChatThemeInputModel.Id"></span>
            </div>
        </div>
        <hr />
        <div id="contentForm" style="display: none">
            <div class="row">
                <div class="col-xl-12 col-md-12 mb-4">
                    <label asp-for="@Model.DeleteChatThemeInputModel.Name"></label>
                    <input asp-for="@Model.DeleteChatThemeInputModel.Name" class="form-control" placeholder="Theme Name" id="themeName" readonly />
                    <span asp-validation-for="@Model.DeleteChatThemeInputModel.Name" class="text-danger"></span>
                </div>
            </div>
            <div class="row">
                <div class="col-xl-12 col-md-12 mb-4">
                    <img style="width: 100%; height: 350px; object-fit: cover; object-position: 50% 50%;" id="themeImage" />
                </div>
            </div>
            <div class="row">
                <div class="col-xl-12 col-md-12 mb-4">
                    <button asp-area="Administration" asp-controller="DeleteChatTheme" asp-action="DeleteChatTheme" class="btn btn-danger btn-icon-split">
                        <span class="icon text-white-50">
                            <i class="fas fa-trash-alt"></i>
                        </span>
                        <span class="text">Delete Theme</span>
                    </button>
                </div>
            </div>
        </div>
    </form>
    <hr />
</div>
<input type="hidden" />

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
    <script src="~/administration/js/deleteChatTheme.js"></script>
}