{% if not error %}
    <div class="col-xl-10 col-12 mx-auto">
        <div class="card shadow-sm">
            <div class="py-3 card-header d-flex align-items-center fs-5">
                <div>
                    Produkte
                </div>
                <div id="product-spinner" class="ms-auto box-hidden">
                    <div class="d-flex align-items-center">
                        <small class="fw-normal fs-6 small-lg pe-2"> loading...</small>
                        <div class="spinner-border font-blue" role="status">
                            <span class="visually-hidden">Loading...</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card-body">
                <div class="row g-3">
                    <div class="col-xl-6 col-12">
                        <form class="form-submit-action">
                            <input type="hidden" name="target" value="#product-spinner">
                            <input type="hidden" name="method" value="free_product_download">
                            <input type="hidden" name="handle" value="pol">
                            <h5 class="fw-semibold">Plugins <small class="fw-light">( free )</small></h5>
                            <div class="form-floating">
                                <select class="product-select pol form-select no-blur w-100" name="id" id="polSelect"
                                        aria-label="Floating label select example" required>
                                    <option value="">auswählen...</option>
                                    {% for pol in data.pol %}
                                        <option value="{{ pol.id }}">{{ pol.bezeichnung }} - ({{ pol.version }})
                                        </option>
                                    {% endfor %}
                                </select>
                                <label for="polSelect">Plugins ohne Lizenz</label>
                            </div>
                            <button type="submit" data-spin="#product-spinner"
                                    class="btn-submit btn btn-blue btn-sm mt-3"
                                    disabled>
                                Plugin Installieren
                            </button>
                            <button type="button" data-type="product_activate" data-handle="pol"
                                    class="btn-activate-pol btn-activate btn-action btn btn-success-custom btn-sm mt-3 d-none">
                                Plugin aktivieren
                            </button>
                        </form>
                    </div>
                    {% if data.child %}
                        <div class="col-xl-6 col-12">
                            <form class="form-submit-action">
                                <input type="hidden" name="target" value="#product-spinner">
                                <input type="hidden" name="method" value="free_product_download">
                                <input type="hidden" name="handle" value="child">
                                <h5 class="fw-semibold">Child <small class="fw-light">( Theme )</small></h5>
                                <div class="form-floating">
                                    <select class="product-select child form-select no-blur w-100" name="id" id="childSelect"
                                            aria-label="Floating label select example" required>
                                        <option value="">auswählen...</option>
                                        {% for child in data.child %}
                                            <option value="{{ child.id }}">{{ child.bezeichnung }} -
                                                ({{ child.version }})
                                            </option>
                                        {% endfor %}
                                    </select>
                                    <label for="floatingSelect">Child Themes</label>
                                </div>
                                <div class="d-flex align-items-center">
                                    <button data-spin="#product-spinner" type="submit"
                                            class="btn-submit btn btn-blue btn-sm mt-3" disabled>
                                        Child Installieren
                                    </button>
                                    <button type="button" data-type="product_activate" data-handle="child"
                                            class="btn-activate-child btn-activate btn-action btn btn-success-custom btn-sm ms-2 mt-3 d-none">
                                        Theme aktivieren
                                    </button>
                                    <div class="mt-3 ms-2">
                                        <input type="number" aria-label="pin" name="pin"
                                               class="form-control no-blur form-control-sm" id="inputPin"
                                               placeholder="Pin" required>
                                    </div>

                                </div>
                            </form>
                        </div>
                    {% endif %}
                    {% if data.tol %}
                        <div class="col-xl-6 col-12">
                            <form class="form-submit-action">
                                <input type="hidden" name="target" value="#product-spinner">
                                <input type="hidden" name="method" value="free_product_download">
                                <input type="hidden" name="handle" value="tol">
                                <h5 class="fw-semibold">Child <small class="fw-light">( Theme )</small></h5>
                                <div class="form-floating">
                                    <select class="product-select tol form-select no-blur w-100" name="id" id="tolSelect"
                                            aria-label="Floating label select example">
                                        <option value="">auswählen...</option>
                                        {% for tol in data.tol %}
                                            <option value="{{ tol.id }}">{{ tol.bezeichnung }} - ({{ tol.version }})
                                            </option>
                                        {% endfor %}
                                    </select>
                                    <label for="tolSelect">Child Themes</label>
                                </div>
                                <button data-spin="#product-spinner" type="submit"
                                        class="btn-submit btn btn-blue btn-sm mt-3">
                                    Theme Installieren
                                </button>
                                <button type="button" data-type="product_activate" data-handle="tol"
                                        class="btn-activate-tol btn-activate btn-action btn btn-success-custom btn-sm mt-3 d-none">
                                    Theme aktivieren
                                </button>
                            </form>
                        </div>
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
{% else %}
    <div class="d-flex justify-content-center align-items-center w-100 mt-5">
        <div class="p-3 border rounded text-center col-xl-6 col-lg-8 col-12">
            <h5 class=" text-danger">
                <i class="bi bi-exclamation-triangle me-1"></i>
                {{ error.error_title }}
            </h5>
            <p class="text-danger">{{ error.description }}</p>
        </div>
    </div>
{% endif %}