<?php

namespace App\Livewire\Pets;

use App\Models\Pet;
use Livewire\Component;

class Show extends Component
{
    public Pet $pet;

    public function mount(string $slug): void
    {
        $this->pet = Pet::query()
            ->with(['species', 'breed'])
            ->where('slug', $slug)
            ->publiclyVisible()
            ->firstOrFail();
    }

    public function render(): mixed
    {
        return view('livewire.pets.show');
    }
}
