/**
 * @fileoverview Advanced select screen for Coding in Chrome editor.
 *
 * @license Copyright 2018 The Coding with Chrome Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @author mbordihn@google.com (Markus Bordihn)
 */
{namespace cwc.soy.SelectScreenAdvanced.robot autoescape="strict"}


/** Default icon. */
{template .icon}
  memory
{/template}


/**
 * Robot overview page.
 */
{template .template}
  {@param experimental: bool}
  {@param modules: ?}

  {call cwc.soy.SelectScreenTemplate.containerSub}
    {param content kind="html"}

      <div class="mdl-tabs__tab-bar">

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param active: true /}
          {param id: 'advanced-robot_overview' /}
          {param name: '@@GENERAL__OVERVIEW' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'advanced-lego_ev3' /}
          {param module: 'lego' /}
          {param name: 'EV3' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'advanced-sphero_classic' /}
          {param module: 'sphero' /}
          {param name: 'Sphero 2.0' /}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
          {param id: 'advanced-sphero_sprk_plus' /}
          {param module: 'sphero' /}
          {param name: 'Sphero SPRK+' /}
        {/call}

        {if $experimental}
          {call cwc.soy.SelectScreenTemplate.subTabBarLink data="all"}
            {param id: 'advanced-sphero_bb8' /}
            {param module: 'sphero' /}
            {param name: 'Sphero BB-8' /}
          {/call}
        {/if}

      </div>

      <div class="cwc-select-screen-scroller">

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param active: true /}
          {param id: 'advanced-robot_overview' /}
          {param content kind="html"}
            {call .overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'advanced-lego_ev3' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenAdvanced.robot.lego.ev3.overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'advanced-sphero_classic' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenAdvanced.robot.sphero.classic.overview data="all" /}
          {/param}
        {/call}

        {call cwc.soy.SelectScreenTemplate.subTabBarContent}
          {param id: 'advanced-sphero_sprk_plus' /}
          {param content kind="html"}
            {call cwc.soy.SelectScreenAdvanced.robot.sphero.sprkPlus.overview data="all" /}
          {/param}
        {/call}

        {if $experimental}
          {call cwc.soy.SelectScreenTemplate.subTabBarContent}
            {param id: 'advanced-sphero_bb8' /}
            {param content kind="html"}
              {call cwc.soy.SelectScreenAdvanced.robot.sphero.bb8.overview data="all" /}
            {/param}
          {/call}
        {/if}

      </div>

    {/param}
  {/call}

{/template}


/**
 * Robot overview page.
 */
{template .overview}
  {@param experimental: bool}

  {call cwc.soy.SelectScreenTemplate.container}
    {param header kind="html"}
      {call cwc.soy.SelectScreenTemplate.header}
        {param title: 'Robots' /}
        {param opt_text: 'Advanced robot control with JavaScript and/or Python' /}
        {param opt_icon kind="html"}{call .icon /}{/param}
      {/call}
    {/param}

    {param content kind="html"}

      {call cwc.soy.SelectScreenTemplate.selectSection data="all"}
        {param title: 'Lego' /}
        {param id: 'advanced-lego' /}
        {param text: 'Control a real or virtual EV3' /}
        {param opt_color_class: 'bg-orange' /}
        {param opt_icon: 'adb' /}

        {param content kind="html"}
          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'EV3 Robot' /}
            {param tab: 'advanced-lego_ev3' /}
          {/call}
        {/param}

      {/call}

      {call cwc.soy.SelectScreenTemplate.selectSection data="all"}
        {param title: 'Sphero' /}
        {param id: 'advanced-sphero' /}
        {param text: 'Control a real or virtual Sphero' /}
        {param opt_color_class: 'bg-orange' /}
        {param opt_icon: 'adjust' /}

        {param content kind="html"}
          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'Sphero 2.0 robot' /}
            {param tab: 'advanced-sphero_classic' /}
          {/call}

          {call cwc.soy.SelectScreenTemplate.selectSectionLink}
            {param text: 'Sphero SPRK+ robot' /}
            {param tab: 'advanced-sphero_sprk_plus' /}
          {/call}

          {if $experimental}
            {call cwc.soy.SelectScreenTemplate.selectSectionLink}
              {param text: 'Sphero BB-8 robot' /}
              {param tab: 'advanced-sphero_bb8' /}
            {/call}
          {/if}
        {/param}
      {/call}

    {/param}
  {/call}

{/template}
