<?php

declare(strict_types=1);

namespace CliqThemes\UI;

use CliqThemes\UI\WordPress\Integration;

/**
 * Entry point helpers for consumers bootstrapping the library.
 */
final class Bootstrap
{
    /**
     * Boots the WordPress integration bridge with sensible defaults.
     *
     * @param array<string,mixed> $config
     */
    public static function wordpress(array $config = []): Integration
    {
        $flags = (array)($config['flags'] ?? []);
        if (! array_key_exists('wordpress_bridge', $flags)) {
            $flags['wordpress_bridge'] = true;
        }

        $config['flags'] = $flags;

        return Integration::boot($config);
    }
}
