<?php

namespace App\Filament\Pages;

use App\Services\KnowledgeGraphService;
use Filament\Pages\Page;

class KnowledgeRelationManagement extends Page
{
    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-link';
    protected static string|\UnitEnum|null $navigationGroup = null;
    protected static ?int $navigationSort = 2;
    protected static bool $shouldRegisterNavigation = false;
    protected static ?string $navigationLabel = '关联关系管理';
    protected static ?string $title = '关联关系管理';
    protected string $view = 'filament.pages.knowledge-relation-management';

    public array $relations = [];

    public function mount(): void
    {
        $service = app(KnowledgeGraphService::class);
        $this->relations = $service->listRelations(1, 1000);
    }
}
