<?php
namespace zin;

global $lang;

$typeList = array();
foreach($lang->repo->scmList as $type => $typeName)
{
    $item = array('text' => $typeName, 'value' => $type);
    if($type == 'GitFox')
    {
        $item['content'] = array('html' => "<div class='flex clip'>{$typeName}</div><label class='label bg-primary-50 text-primary ml-2 flex-none'>{$lang->recommend}</label>", 'class' => 'w-full flex nowrap');
    }

    $typeList[] = $item;
}

$typeDom = formGroup
(
    set::width('1/2'),
    set::id('SCM'),
    set::name('SCM'),
    set::label($lang->product->typeAB),
    set::required(true),
    set::items($typeList)
);

query('#SCM')->replaceWith($typeDom);
