<?php
/**
 * License limited to a single site, for use on another site please purchase a license for this module.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * @author    Dingedi.com
 * @copyright Copyright 2020 © Dingedi All right reserved
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *
 * @category  Dingedi PrestaShop Modules
 */

namespace Dingedi\PsTools;

if (!defined('_PS_VERSION_')) {
    exit;
}

class DgShopInfos
{
    /**
     * @var string
     */
    public static $unsupportedVersion = 'Your PrestaShop Version is not supported by this module';

    /**
     * @return bool
     */
    public static function isPrestaShop16()
    {
        return version_compare(_PS_VERSION_, '1.6', '>') && version_compare(_PS_VERSION_, '1.7', '<');
    }

    /**
     * @return bool
     */
    public static function isPrestaShop17()
    {
        return version_compare(_PS_VERSION_, '1.7', '>') && version_compare(_PS_VERSION_, '8', '<');
    }

    /**
     * @return bool
     */
    public static function isPrestaShop8()
    {
        return version_compare(_PS_VERSION_, '8', '>') && version_compare(_PS_VERSION_, '9', '<');
    }

    /**
     * @return bool
     */
    public static function isPrestaShop9()
    {
        return version_compare(_PS_VERSION_, '9', '>') && version_compare(_PS_VERSION_, '10', '<');
    }

    /**
     * @return string
     */
    public static function getDefaultTheme()
    {
        return _THEME_NAME_;
    }

    /**
     * @return mixed[]
     */
    public static function getLanguages()
    {
        return \Language::getLanguages(false);
    }
}
