<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="/i18n_setup.html">
<link rel="import" href="/settings_shared_css.html">

<if expr="chromeos">
<link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-animatable.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/paper-toggle-button.html">
<link rel="import" href="/a11y_page/manage_a11y_page.html">
<link rel="import" href="/settings_page/settings_animated_pages.html">
<link rel="import" href="/settings_page/settings_subpage.html">
</if>

<dom-module id="settings-a11y-page">
  <template>
    <style include="settings-shared"></style>
<if expr="chromeos">
    <settings-animated-pages id="pages" current-route="{{currentRoute}}"
        section="a11y">
      <neon-animatable route-path="default">
        <div class="settings-box first">
          <div class="start">$i18n{optionsInMenuLabel}</div>
          <paper-toggle-button id="optionsInMenuToggle"
              checked="{{prefs.settings.a11y.enable_menu.value}}">
          </paper-toggle-button>
        </div>
        <div id="subpage-trigger" class="settings-box two-line"
            on-tap="onManageAccessibilityFeaturesTap_" actionable>
          <div class="start">
            $i18n{manageAccessibilityFeatures}
            <div class="secondary">$i18n{moreFeaturesLinkDescription}</div>
          </div>
          <button class="subpage-arrow" is="paper-icon-button-light"></button>
        </div>
      </neon-animatable>
      <template is="dom-if" route-path="/manageAccessibility">
        <settings-subpage
            associated-control="[[$$('#subpage-trigger')]]"
            page-title="$i18n{manageAccessibilityFeatures}">
          <settings-manage-a11y-page prefs="{{prefs}}">
          </settings-manage-a11y-page>
        </settings-subpage>
      </template>
    </settings-animated-pages>
</if>

<if expr="not chromeos">
    <div class="settings-box first two-line" on-tap="onMoreFeaturesTap_"
        actionable>
      <div class="start">
        $i18n{moreFeaturesLink}
        <div class="secondary">$i18n{a11yWebStore}</div>
      </div>
      <button class="icon-external" is="paper-icon-button-light"></button>
    </div>
</if>

  </template>
  <script src="a11y_page.js"></script>
</dom-module>
