<?php

namespace App\Filament\Resources\PhotoGeoData\Pages;

use App\Filament\Resources\PhotoGeoData\PhotoGeoDataResource;
use App\Filament\Resources\PhotoGeoData\Pages\Concerns\HandlesImageMetadata;
use Filament\Actions\DeleteAction;
use Filament\Resources\Pages\EditRecord;

class EditPhotoGeoData extends EditRecord
{
    use HandlesImageMetadata;

    protected static string $resource = PhotoGeoDataResource::class;
     protected ?string $heading = 'Redigera bild';

    protected function getHeaderActions(): array
    {
        return [
            DeleteAction::make(),
        ];
    }

    protected function afterSave(): void
    {
        $this->syncMetadataFromImage();
    }
}
