<?php

if( !function_exists( 'xfRoute' ) ){
    function xfRoute( string $routeName, array $arguments = [] ): string {
        return app(\App\Services\XenforoService::class)->getRoute( $routeName, $arguments );
    }
}

if( !function_exists( 'xfCsrfToken') ){
    function xfCsrfToken(): string {
        return app(\App\Services\XenforoService::class)->getCSRFToken();
    }
}

if( !function_exists( 'xfStyleVariationUrl' ) ){
    function xfStyleVariationUrl( string $variation ): string {
        return config('app.forum_url') . '/misc/style-variation?variation=' . $variation . "&t=" . xfCsrfToken();
    }
}
