<?php

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

class FileDetails
{
    public string $uuid;
    public string $url;
    public string $type;

    public function __construct(Kirby\Cms\File $data)
    {
        $this->uuid = (string) $data->uuid();
        $this->url = (string) $data->url();
        $this->type = (string) $data->type();
    }

    public function toArray() {
        return [
            "uuid" => $this->uuid,
            "url" => $this->url,
            "type" => $this->type
        ];
    }
}
