<?php
/**
 * BookiFlex Simple Quota Extension
 *
 * @package    BookiFlex
 * @subpackage SimpleQuota
 * @author     BookiFlex
 * @copyright  Copyright (c) 2025 BookiFlex
 * @license    GPL-2.0-or-later
 *
 * @link       https://bookiflex.com
 */

declare(strict_types=1);

namespace BookiFlex\Extensions\SimpleQuota;

use BookiFlex\Core\Contract\ExtensionInterface;
use BookiFlex\Core\Contract\PluginInterface;

defined( 'ABSPATH' ) || exit;

class SimpleQuota implements ExtensionInterface
{
    protected PluginInterface $plugin;

    public function init(PluginInterface $plugin): void
    {
        $this->plugin = $plugin;

        $plugin->getContainer()->register(new ServiceProvider());
    }

    public function getName(): string
    {
        return 'SimpleQuota';
    }

    public function getVersion(): string
    {
        return '1.0.0';
    }

    public function isCompatible(string $pluginVersion): bool
    {
        return version_compare($pluginVersion, '1.0.0', '>=');
    }
}
