<?php
    $elementorLicenseKey = '';

    $settingModel = \CromurClient\Models\SettingsModel::select('*')->where('name', "=",
        \CromurClient\Models\SettingsModel::SETTING_ELEMENTOR_LICENSE_KEY)->getOneRow();
    if (! is_null($settingModel)) {
        $elementorLicenseKey = $settingModel->value;
    }
?>

<?php if (strlen($elementorLicenseKey) == 0): ?>
    <?php $url = admin_url() . 'admin.php?cromur_client_action=settings-form'; ?>
    <div class="alert alert-warning mb-2">
        <?php echo esc_html__('Please enter settings to avoid plugin misbehavior. ',
            'cromur-client'); ?>
        <button class="btn btn-primary btn-sm data-link" data-end-point="<?php echo $url; ?>">Setup settings</button>
    </div>
<?php else: ?>
    <?php require_once 'installable-themes-plugins-block.php'; ?>
<?php endif; ?>
