<?php

declare(strict_types=1);

namespace App\Modules\Parties\Application\Services;

final class PartiesRouteContext
{
    public function isPartiesRoute(): bool
    {
        return true;
    }

    public function listPath(string $type = 'all'): string
    {
        return match ($type) {
            'customer' => '/parties/customers',
            'supplier' => '/parties/suppliers',
            default => '/parties',
        };
    }

    public function viewPath(int $id): string
    {
        return '/parties/view?id=' . $id;
    }

    public function editPath(int $id, string $type = 'all'): string
    {
        return $this->listPath($type) . '?edit=' . $id;
    }
}
