<?php
/**
 * @package embed-sharepoint-onedrive-documents
 * @author miniOrange
 * @link https://plugins.miniorange.com
 */


namespace MoSharePointObjectSync\LicenseLibrary\Utils;

use MoSharePointObjectSync\LicenseLibrary\Classes\Mo_License_Constants;
use MoSharePointObjectSync\LicenseLibrary\Classes\Mo_License_Dao;
use MoSharePointObjectSync\LicenseLibrary\Mo_License_Config;
use MoSharePointObjectSync\LicenseLibrary\Mo_License_Service;
if (defined("\101\102\x53\x50\101\x54\x48")) {
    goto Z8;
}
exit;
Z8:
class Mo_License_View_Utility
{
    public static function get_expiry_admin_notice_class($cB)
    {
        if ($cB > 10) {
            goto PE;
        }
        if ($cB <= 10) {
            goto J_;
        }
        goto lY;
        PE:
        return "\156\x6f\164\x69\x63\145\55\167\141\x72\x6e\151\156\x67";
        goto lY;
        J_:
        return "\156\x6f\164\151\143\145\55\145\x72\x72\x6f\162";
        lY:
        return '';
    }
    public static function get_admin_notice_html($hL, $Dv)
    {
        $ru = Mo_License_Config::$notice_html[$hL];
        $ru["\143\x6f\156\x74\x65\156\x74"] = strtr($ru["\143\157\x6e\x74\x65\156\164"], $Dv);
        return $ru;
    }
    public static function get_notice_day_key($cB)
    {
        if ($cB <= 60 && $cB > 30) {
            goto BN;
        }
        if ($cB <= 30 && $cB > 10) {
            goto vF;
        }
        if ($cB <= 10 && $cB >= 0) {
            goto mp;
        }
        if ($cB < 0 && $cB >= -Mo_License_Config::GRACE_PERIOD_DAYS) {
            goto vB;
        }
        if ($cB < -Mo_License_Config::GRACE_PERIOD_DAYS) {
            goto Fy;
        }
        goto bF;
        BN:
        return Mo_License_Constants::EXPIRY_IN_30_TO_60_DAYS;
        goto bF;
        vF:
        return Mo_License_Constants::EXPIRY_IN_10_TO_30_DAYS;
        goto bF;
        mp:
        return Mo_License_Constants::EXPIRY_IN_10_DAYS;
        goto bF;
        vB:
        return Mo_License_Constants::GRACE_PERIOD_STARTED;
        goto bF;
        Fy:
        return Mo_License_Constants::GRACE_PERIOD_EXPIRED;
        bF:
        return false;
    }
    public static function get_widget_notice($Dv)
    {
        $P8 = '';
        $Lm = Mo_License_Service::is_license_expired();
        if (true === $Lm["\123\x54\101\x54\125\123"]) {
            goto x0;
        }
        if (false === $Lm["\x53\124\101\x54\125\123"] && "\114\111\103\105\116\x53\105\x5f\111\x4e\x5f\x47\122\101\103\105" === $Lm["\x43\117\104\105"]) {
            goto D8;
        }
        if ($Dv["\43\43\x72\x65\155\x61\x69\156\x69\x6e\x67\x5f\144\141\171\x73\43\43"] < 60) {
            goto Lj;
        }
        goto V8;
        x0:
        $P8 = "\131\x6f\x75\x72\x20\160\154\165\147\151\156\40\154\151\143\x65\x6e\x73\145\x20\x68\x61\x73\40\145\170\160\x69\x72\x65\x64\40\x61\x6e\x64\40\x74\x68\145\x20\160\154\165\147\x69\156\40\150\141\x73\x20\163\x74\157\160\160\145\144\x20\167\157\x72\x6b\x69\x6e\147\x2e\x20\x50\154\x65\x61\163\x65\x20\x3c\141\40\150\162\145\x66\x3d\42" . Mo_License_Config::RENEWAL_FAQ . "\x22\x20\x74\141\x72\x67\145\x74\75\42\x5f\x62\154\141\156\x6b\42\76\162\145\156\145\x77\x20\x79\x6f\165\x72\x20\154\151\143\x65\x6e\163\x65\74\x2f\141\76\x20\151\x6d\155\x65\144\151\141\164\x65\x6c\171\56";
        goto V8;
        D8:
        $P8 = "\131\x6f\x75\40\x61\162\x65\40\143\x75\162\162\x65\156\x74\154\171\x20\157\x6e\x20\x67\162\x61\143\145\40\160\x65\162\151\157\144\40\146\x6f\162\40\x72\x65\x6e\x65\167\141\154\x2e\40" . esc_html($Dv["\43\43\147\162\x61\143\x65\x5f\144\141\x79\163\137\x6c\x65\x66\164\x23\43"]) . "\x20\144\x61\171\163\x20\x6c\x65\x66\164\x20\x62\145\146\x6f\x72\145\x20\x53\x53\x4f\x20\x69\163\40\x64\x69\x73\x61\142\x6c\145\144\x20\x6f\x6e\40\x79\x6f\165\x72\x20\x73\x69\x74\x65\x2e";
        goto V8;
        Lj:
        $P8 = "\131\157\165\162\40\x70\x6c\165\x67\151\156\x20\x6c\151\143\145\156\163\145\x20\x69\163\40\x67\157\x69\x6e\x67\x20\164\157\40\x65\x78\x70\151\162\x65\40\151\156\x20" . esc_html($Dv["\43\43\162\x65\x6d\141\x69\156\151\x6e\147\x5f\144\x61\171\x73\43\43"]) . "\40\x64\141\171\163";
        V8:
        return $P8;
    }
    public static function show_expiry_notice($cB)
    {
        $k2 = Mo_License_Dao::mo_get_option(Mo_License_Constants::EXPIRY_NOTICE_CLOSE_OPTION);
        if (!isset($cB) || $cB > 60) {
            goto Cx;
        }
        if ($cB <= 10) {
            goto S2;
        }
        if (!$k2 && $cB <= 60) {
            goto aU;
        }
        if ($k2 && $k2 > 30 && $cB <= 30) {
            goto dl;
        }
        goto Uw;
        Cx:
        return false;
        goto Uw;
        S2:
        return true;
        goto Uw;
        aU:
        return true;
        goto Uw;
        dl:
        return true;
        Uw:
        return false;
    }
}
