public function addVersion(array $attrs = []): PageVersionInterface
    {
        if ($oldVersion = $this->getCurrentVersion()) {
            $attrs += $oldVersion->toArray();
        }

        // Chunk type and ID fields shouldn't be copied.
        unset($attrs[PageVersion::ATTR_CHUNK_TYPE]);
        unset($attrs[PageVersion::ATTR_CHUNK_ID]);
        unset($attrs[PageVersion::ATTR_RESTORED_FROM]);

        $newVersion = new PageVersion($attrs);
        $newVersion->setPage($this);

        /*
         * Only make the new version a draft if the old version is published.
         * When a new page is created we set the edited_at time to make the first version published
         */
        if ($oldVersion->isPublished()) {
            $newVersion->makeDraft();
        }

        $newVersion->save();

        $this->setCurrentVersion($newVersion);

        return $this->getCurrentVersion();
    }