<?php

namespace Modules\Stock\Rules;

use Helpers\Outil\Roles;
use Modules\Stock\Helper\RulesHelper;

class CahierInventaire extends BaseRules
{
    /**
     * @return bool
     */
    public function init(): bool
    {
        return RulesHelper::hasInvAccessRights($this->pdo);
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function popupExport(): bool
    {
        return (bool) Roles::droitsUtilisateur($this->pdo, 'ST_IN_IMEX');
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function exporter(): bool
    {
        return (bool) Roles::droitsUtilisateur($this->pdo, 'ST_IN_IMEX');
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function importerForm(): bool
    {
        return (bool) Roles::droitsUtilisateur($this->pdo, 'ST_IN_IMEX');
    }

    /**
     * @return bool
     */
    // @phpcs:ignore
    public function importer(): bool
    {
        return (bool) Roles::droitsUtilisateur($this->pdo, 'ST_IN_IMEX');
    }
}
