<?php

namespace AutoAdmin\Bundle\Media\Model\Library;

class LinkedMediaPropConfig
{
    public function __construct(
        protected \ReflectionProperty $prop,
        protected array $config,
    ) {
    }

    public function getProp(): \ReflectionProperty
    {
        return $this->prop;
    }

    public function setProp(\ReflectionProperty $prop): LinkedMediaPropConfig
    {
        $this->prop = $prop;

        return $this;
    }

    public function getConfig(): array
    {
        return $this->config;
    }


    public function getMappings(): ?array
    {
        return $this->config['mappings'] ?: null;
    }

    public function setConfig(array $config): LinkedMediaPropConfig
    {
        $this->config = $config;

        return $this;
    }
}