<?php

if (! function_exists('tenant')) {
    /**
     * Get the current tenant Company, or null if in central context.
     */
    function tenant(): ?\App\Models\Central\Company
    {
        return app(\App\Tenancy\TenantManager::class)->current();
    }
}
