<?php


namespace AutoAdmin\Bundle\Seo\Sitemap\Model;


use DateTimeInterface;

class SitemapUrl
{
    const DEFAULT_CHANGE_FREQ = 'daily';

    protected string $section = 'default';

    protected string $url;

    protected ?DateTimeInterface $lastModification = null;

    protected ?string $changeFrequency = null;

    protected ?float $priority = null;

    /**
     * @var array<string>
     */
    protected array $images = [];

    public function __construct(
        string $url,
        ?DateTimeInterface $lastModification = null,
        ?string $changeFrequence = null,
        ?float $priority = null
    ) {
        $this->url = $url;
        $this->lastModification = $lastModification;
        $this->changeFrequency = $changeFrequence;
        $this->priority = $priority;
    }

    public function getSection(): string
    {
        return $this->section;
    }

    public function setSection(string $section): void
    {
        $this->section = $section;
    }

    public function getUrl(): string
    {
        return $this->url;
    }

    public function setUrl(string $url): void
    {
        $this->url = $url;
    }

    public function getLastModification(): ?DateTimeInterface
    {
        return $this->lastModification;
    }

    public function setLastModification(?DateTimeInterface $lastModification): void
    {
        $this->lastModification = $lastModification;
    }

    public function getChangeFrequency(): ?string
    {
        return $this->changeFrequency;
    }

    public function setChangeFrequency(?string $changeFrequency): void
    {
        $this->changeFrequency = $changeFrequency;
    }

    public function getPriority(): ?float
    {
        return $this->priority;
    }

    public function setPriority(?float $priority): void
    {
        $this->priority = $priority;
    }

    public function getImages(): array
    {
        return $this->images;
    }

    public function setImages(array $images): void
    {
        $this->images = $images;
    }

    public function addImages(string $image): void
    {
        $this->images[] = $image;
    }
}
