<?php

declare (strict_types=1);
namespace Syde\Vendor\Inpsyde\Assets;

use Syde\Vendor\Inpsyde\Assets\Handler\ScriptModuleHandler;
class ScriptModule extends BaseAsset implements Asset
{
    use DependencyExtractionTrait;
    /**
     * @var array<string, mixed>
     */
    protected array $data = [];
    /**
     * @return array<string, mixed>
     */
    public function data(): array
    {
        return $this->data;
    }
    /**
     * @param array<string, mixed> $data
     *
     * @return static
     */
    public function withData(array $data): Asset
    {
        $this->data = array_merge($this->data, $data);
        return $this;
    }
    /**
     * {@inheritDoc}
     */
    protected function defaultHandler(): string
    {
        return ScriptModuleHandler::class;
    }
    /**
     * {@inheritDoc}
     */
    public function version(): ?string
    {
        $this->resolveDependencyExtractionPlugin();
        return parent::version();
    }
    /**
     * {@inheritDoc}
     */
    public function dependencies(): array
    {
        $this->resolveDependencyExtractionPlugin();
        return parent::dependencies();
    }
}
