@using System.Globalization
@using Microsoft.Extensions.Localization
@inject IStringLocalizer<QRRapidoApp.Resources.SharedResource> Localizer
@inject Microsoft.Extensions.Configuration.IConfiguration Configuration

@{

    ViewData["Title"] = Localizer["PremiumSupportFormPageTitle"];
    var formAction = Configuration["Support:FormspreeUrl"] ?? "https://formspree.io/f/xpwynqpj";
    var culture = CultureInfo.CurrentUICulture.Name;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<section class="container py-5">
    <div class="row justify-content-center">
        <div class="col-lg-6">
            <div class="card shadow-sm border-0">
                <div class="card-body p-4 p-md-5">
                    <h1 class="h4 mb-3">@Localizer["PremiumSupportFormHeading"]</h1>
                    <p class="text-muted mb-4">@Localizer["PremiumSupportFormDescription"]</p>

                    <form action="@formAction" method="POST" class="support-form">
                        <input type="hidden" name="_language" value="@culture" />
                        <input type="hidden" name="_subject" value="QR Rápido - Premium Support" />
                        <input type="hidden" name="_template" value="table" />

                        <div class="mb-3">
                            <label for="supportName" class="form-label">@Localizer["PremiumSupportFormNameLabel"]</label>
                            <input type="text"
                                   id="supportName"
                                   name="name"
                                   class="form-control"
                                   required
                                   autocomplete="name"
                                   placeholder="@Localizer["PremiumSupportFormNamePlaceholder"]" />
                        </div>

                        <div class="mb-3">
                            <label for="supportEmail" class="form-label">@Localizer["PremiumSupportFormEmailLabel"]</label>
                            <input type="email"
                                   id="supportEmail"
                                   name="email"
                                   class="form-control"
                                   required
                                   autocomplete="email"
                                   placeholder="@Localizer["PremiumSupportFormEmailPlaceholder"]" />
                        </div>

                        <div class="mb-3">
                            <label for="supportMessage" class="form-label">@Localizer["PremiumSupportFormMessageLabel"]</label>
                            <textarea id="supportMessage"
                                      name="message"
                                      class="form-control"
                                      rows="5"
                                      required
                                      placeholder="@Localizer["PremiumSupportFormMessagePlaceholder"]"></textarea>
                        </div>

                        <div class="mb-4">
                            <label for="supportPreferredChannel" class="form-label">@Localizer["PremiumSupportFormPreferredChannelLabel"]</label>
                            <select id="supportPreferredChannel"
                                    name="preferred_channel"
                                    class="form-select">
                                <option value="telegram">@Localizer["PremiumSupportFormChannelTelegram"]</option>
                                <option value="email">@Localizer["PremiumSupportFormChannelEmail"]</option>
                                <option value="phone">@Localizer["PremiumSupportFormChannelPhone"]</option>
                            </select>
                        </div>

                        <button type="submit" class="btn btn-primary w-100">
                            <i class="fas fa-paper-plane me-2"></i>@Localizer["PremiumSupportFormSubmitLabel"]
                        </button>
                    </form>

                    <p class="mt-3 text-center text-muted small">
                        @Localizer["PremiumSupportFormPrivacyDisclaimer"]
                    </p>
                </div>
            </div>
        </div>
    </div>
</section>
