<?php

namespace Lightscale\LaralightAssets;

use Illuminate\Contracts\Support\Htmlable;

abstract class File implements Htmlable
{
    private string $path;

    protected function setPath(string $path): void
    {
        $this->path = $path;
    }

    public function getPath(): string
    {
        return $this->path;
    }

    public function hash(): string
    {
        $class = static::class;
        return md5("{$class}|{$this->path}");
    }

    abstract public function toHtml(): string
}