<?php

declare(strict_types=1);

namespace apexl\Io\modules\tabulator\Interfaces;

use apexl\Io\includes\RouteManager;
use apexl\Io\modules\tabulator\Tabulatable\Tabulatable;
use Arrayy\Type\StringCollection;

interface HasTabulatorViewInterface
{
    public static function tabulatorListTitle(): string;

    public static function tabulatorRouteName(): string;

    public static function tabulatorRoute(RouteManager $routeManager): string;

    public static function tabulatorAjaxRoute(RouteManager $routeManager): string;

    public static function shortName(): string;

    public static function tabulatorDisplayControllerClass(): ?string;

    public function getNiceName(): string;

    public function getTableName(): string;

    public function getPrimaryKey(): string;

    public function tabulatable(): Tabulatable;

    public function tabulate(array|StringCollection $fields = [], bool $excludeAjax = true): array;

    /** @return class-string<Tabulatable> */
    public function tabulatableClass(): string;

    //    @todo Reactivate these when they are implemented in all entities
    //    public function isRelationField($field): bool;
    //
    //    public function relation(string $relation): ?RelationshipInterface;
}
