func Components.DiscoverEntry(item)
{
    switch(item.type)
    {
        case "video":
            return 
            <div class="row">
                <div class="min">
                    <img src={$"./video-thumbnail?v={Net.Http.UrlEncode(item.id)}"} width="144" width="120">
                </div>
                <div class="max">
                    <div class="col">
                        <div class="min">
                            <a target="_blank" href={$"./video?v={Net.Http.UrlEncode(item.id)}"}>{item.title}</a>
                        </div>
                        <div class="min">
                            <span>{item.views} • {item.uploaded}</span>
                        </div>
                        <div class="min">
                            <each(var part : item.author)>
                                <if(TypeOf(part.navigationEndpoint) == "Dictionary")>
                                    <true>
                                        <a target="_blank" href={$"./channel?id={Net.Http.UrlEncode(part.navigationEndpoint.browseEndpoint.browseId)}"}>{part.text}</a>

                                    </true>
                                    <false>
                                        <span>{part.text}</span>
                                    </false>
                                </if>
                            </each>
                        </div>
                       
                    </div>
                </div>
            </div>;
            break;
        case "channel":
            return 
            <div class="row">
                <div class="min">
                    <img src={$"./channel-thumbnail?id={Net.Http.UrlEncode(item.id)}"} width="144" width="144">
                </div>
                <div class="max">
                    <div class="col">
                    <div class="min">
                     <a target="_blank" href={$"./channel?id={Net.Http.UrlEncode(item.id)}"}>{item.title}</a>
                    </div>
                    <div class="min">
                    <span>{item.subs}</span>
                    </div>
                    <div class ="min">
                    <p class="min">{item.description}</p>
                    </div>
                    </div>
                   
                </div>
            </div>;
            break;
    }
    
    return "";
}