<div class="modal" id="refreshLicense" data-refresh-license-modal>
    <div class="modal__dialog">
        <div class="modal__content">
            <div class="modal__top top">
                <h4 class="top__title h6">
                    Change License Key
                    <span class="form-label__counter label-docs">
                        {include file="adminarea/includes/helpers/docs.tpl" link="https://lagom.rsstudio.net/docs/licensing/"}
                    </span>
                </h4>
                <div class="top__toolbar">
                    <button class="close btn btn--xs btn--icon btn--link" data-dismiss="lu-modal" aria-label="Close">
                        <i class="btn__icon lm lm-close"></i>
                    </button>
                </div>
            </div>
            <div class="modal__body p-b-0x">
                <div data-refresh-license-default-view>
                    <p class="m-b-3x">
                        If you have received a new key, enter it below to switch your license. The page will reload automatically to apply your changes.
                    </p>
                    <div class="panel panel--gray p-3x m-b-3x" data-refresh-license-panel>
                        <div class="form-group m-b-0x">
                            <label class="form-label">
                                Enter a new license key
                                {if isset($tooltips['info']['modal_license']['change_license']['content']) && $tooltips['info']['modal_license']['change_license']['content']}
                                    {if isset($tooltips['info']['modal_license']['change_license']['url']) && $tooltips['info']['modal_license']['change_license']['url'] != ""}
                                        {assign var="popoverFooter" value="<a class='btn btn--secondary btn--xs' href='{$tooltips['info']['modal_license']['change_license']['url']}' target='_blank'>Learn More</a>"}
                                    {else}
                                        {assign var="popoverFooter" value=false}
                                    {/if}
                                    {include
                                        file="adminarea/includes/helpers/popover.tpl"
                                        popoverClasses="notification__popover popover__top"
                                        popoverBody="{$tooltips['info']['modal_license']['change_license']['content']}"
                                        popoverFooter="{$popoverFooter}"
                                    }
                                {/if}
                            </label>
                            <div class="input-group ">
                                <span class="input-group__icon">
                                    <svg class="icon-gray" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <g clip-path="url(#clip0_16979_4672)">
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M5.25 10.5C6.10009 10.5 6.90298 10.298 7.61329 9.93928L11.5257 13.8517L9.8339 15.5435C9.54101 15.8364 9.54101 16.3113 9.8339 16.6042L10.9952 17.7655C11.2881 18.0584 11.763 18.0584 12.0558 17.7655L13.7477 16.0736L15.3255 17.6515C15.6184 17.9443 16.0932 17.9443 16.3861 17.6515L17.6515 16.3861C17.9444 16.0932 17.9444 15.6183 17.6515 15.3254L9.9393 7.61323C10.298 6.90294 10.5 6.10006 10.5 5.25C10.5 2.35051 8.1495 0 5.25 0C2.35051 0 0 2.35051 0 5.25C0 8.1495 2.35051 10.5 5.25 10.5ZM5.25 7.5C6.49264 7.5 7.5 6.49264 7.5 5.25C7.5 4.00736 6.49264 3 5.25 3C4.00736 3 3 4.00736 3 5.25C3 6.49264 4.00736 7.5 5.25 7.5Z" fill="#B9BDC5"/>
                                        </g>
                                        <defs>
                                            <clipPath id="clip0_16979_4672">
                                                <rect width="18" height="18" fill="white"/>
                                            </clipPath>
                                        </defs>
                                    </svg>
                                </span>
                                <input class="form-control p-l-2x" type="text" data-refresh-license-input>
                            </div>
                            <div class="help-block is-hidden" data-refresh-license-error></div>
                        </div>
                    </div>
                    <div class="alert alert--faded alert--danger is-hidden m-b-3x has-icon" data-refresh-license-alert>
                        <span data-refresh-license-alert-text></span>
                    </div>
                </div>

                <div class="is-hidden" data-refresh-license-warning-view>
                    <p class="m-b-1x">
                        Continuing will deactivate the following extensions because the new license doesn't include them or they have no single license assigned:
                    </p>
                    <ol class="m-b-1x p-2 p-l-3x" data-refresh-license-extensions-list></ol>
                    <p class="m-b-3x">
                        Please verify your configuration. You can <strong>Continue</strong> to deactivate the listed extensions, or <strong>Check again</strong> to go back and enter a different license key.
                    </p>
                </div>
            </div>
            <div class="modal__actions">
                <div data-refresh-license-default-actions>
                    <button
                        class="btn btn--default is-disabled"
                        data-refresh-license-modal-btn
                        data-btn-loader
                        data-ajax-url="{$whmcsURL}/modules/addons/RSThemes/src/Api/adminApi.php?controller=AddonApi&method=validateAddonKey"
                        disabled
                    >
                        <span class="btn__preloader preloader preloader--light"></span>
                        <span class="btn__text">Verify Key</span>
                    </button>
                    <button data-dismiss="lu-modal" aria-label="Close" type="button" class="btn btn--default btn--outline">
                        <span class="btn__text">Cancel</span>
                    </button>
                </div>
                <div class="is-hidden" data-refresh-license-warning-actions>
                    <button class="btn btn--primary" data-refresh-license-continue-btn data-btn-loader type="button">
                        <span class="btn__preloader preloader preloader--light"></span>
                        <span class="btn__text">Continue</span>
                    </button>
                    <button class="btn btn--default btn--outline" data-refresh-license-check-again-btn type="button">
                        <span class="btn__text">Check again</span>
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
