<?php

namespace Formatrica\Frontend;

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

use Formatrica\Setup\Service_Locator;
use Formatrica\Setup\Service_Provider;

final class Frontend_Service_Provider implements Service_Provider
{
    public function register(Service_Locator $services): void
    {
        $shortcode = new Shortcode_Renderer();
        add_action('init', [$shortcode, 'register_shortcode']);

        $block = new Block_Registrar();
        add_action('init', [$block, 'register_block'], 20);

        $services->set(Shortcode_Renderer::class, $shortcode);
        $services->set(Block_Registrar::class, $block);
    }
}
