<script src="../plugins/import/tld/PluginTld.js?version=<?php echo $this->gVersion; ?>"></script>

<div class="container-fluid tld-import-form">

    <div class="row g-3">

        <!-- Registrar -->
        <div class="col-md-6">
            <label for="registrar" class="form-label">
                <?php echo $this->user->lang("Registrar"); ?>:
            </label>
            <select name="registrar" id="registrar" class="form-select select2">
                <?php foreach ($this->registrars as $registrar) { ?>
                    <option value="<?php echo $registrar; ?>">
                        <?php echo $registrar; ?>
                    </option>
                <?php } ?>
            </select>
        </div>

        <!-- Product Group -->
        <div class="col-md-6">
            <label for="group" class="form-label">
                <?php echo $this->user->lang("Product Group"); ?>:
            </label>
            <select name="group" id="group" class="form-select select2">
                <?php foreach ($this->productGroups as $group) { ?>
                    <option value="<?php echo $group->getId(); ?>">
                        <?php echo $group->name; ?>
                    </option>
                <?php } ?>
            </select>
        </div>

        <!-- Margin -->
        <div class="col-md-6">
            <label for="margin"
                   class="form-label"
                   data-bs-toggle="tooltip"
                   title="Enter the margin percentage increase from your TLD pricing in your registrar account">
                <?php echo $this->user->lang("Margin"); ?>:
            </label>
            <div class="input-group">
                <input type="text"
                       name="margin"
                       id="margin"
                       value="10"
                       class="form-control">
                <span class="input-group-text">%</span>
            </div>
        </div>

        <!-- Override -->
        <div class="col-md-6 d-flex align-items-center">
            <div class="form-check mt-4">
                <input type="checkbox"
                       name="override"
                       id="override"
                       class="form-check-input">
                <label for="override"
                       class="form-check-label"
                       data-bs-toggle="tooltip"
                       title="Selecting this will override all existing TLDs with the new margin">
                    <?php echo $this->user->lang("Overriding Existing Prices?"); ?>
                </label>
            </div>
        </div>

    </div> <!-- /.row -->
</div> <!-- /.container-fluid -->

<!-- Import Button -->
<button class="cm-btns orange mt-3" id="importTLDButton">
    <span><?php echo $this->user->lang("Import"); ?></span>
</button>

<br><br>

<!-- Results -->
<div class="alert ce-alert d-none" id="import-results-div">
    <span class="bold-item"><?php echo $this->user->lang('Import Results'); ?>:</span>
    <ul id="tld-import-result"></ul>
</div>
