<?php
namespace zin;

global $app, $lang;

jsVar('gitfoxUrlTips', $lang->gitfox->placeholder->url);
jsVar('gitfoxTokenTips', $lang->gitfox->placeholder->token);

$typeList = array();
foreach($lang->space->appType 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;
}
$service = 'gitfox';

$typeDom = picker
(
    set::items($typeList),
    set::name('appType'),
    set::required(true),
    set::id('appType'),
    on::change('onChangeAppType')
);

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