<?php

namespace adrienpayet\D2P\data\location;
use Kirby\Cms\Page;

class PageDetails
{
    protected Page $page;

    public function __construct(Page $page)
    {
        $this->page = $page;
    }

    public function toArray() {
        return [
            "uuid" => (string) $this->page->uuid(),
            "template" => (string) $this->page->template(),
            "panelUrl" => (string) $this->page->panel()->url(),
            "uri" => (string) $this->page->uri(),
            "title" => (string) $this->page->title(),
        ];
    }
}