<?php

declare(strict_types=1);

namespace Plugin\tnt_international_phone\src\Support;

final class PhoneConfigBuilder
{
    /**
     * @param array<string, mixed> $config
     * @param array<string, mixed> $translations
     * @return array<string, mixed>
     */
    public static function build(array $config, array $translations): array
    {
        return [
            'tnt_ip_mobile_icon'  => (string)($config['mobile_icon'] ?? ''),
            'tnt_ip_phone_icon'   => (string)($config['phone_icon'] ?? ''),
            'tnt_ip_phone_prefix' => (string)($config['phone_prefix'] ?? ''),
            'tnt_ip_default'      => (string)($config['default'] ?? ''),
            'tnt_ip_lang_vars'    => $translations,
        ];
    }
}
