<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="/controls/controlled_button.html">
<link rel="import" href="/controls/settings_checkbox.html">
<link rel="import" href="/settings_shared_css.html">

<dom-module id="settings-downloads-page">
  <template>
    <style include="settings-shared"></style>
    <div class="settings-box first two-line">
      <div class="start">
        <div>$i18n{downloadLocation}</div>
        <div class="secondary">[[prefs.download.default_directory.value]]</div>
      </div>
      <div class="secondary-action">
        <controlled-button class="secondary-button" id="changeDownloadsPath"
            on-tap="selectDownloadLocation_"
            pref="[[prefs.download.default_directory]]">
          $i18n{changeDownloadLocation}
        </controlled-button>
      </div>
    </div>
    <div class="settings-box block">
      <settings-checkbox pref="{{prefs.download.prompt_for_download}}"
          label="$i18n{promptForDownload}">
      </settings-checkbox>
<if expr="chromeos">
      <settings-checkbox pref="{{prefs.gdata.disabled}}"
          label="$i18n{disconnectGoogleDriveAccount}"
          hidden="[[!pageVisibility.googleDrive]]">
      </settings-checkbox>
</if>
    </div>
  </template>
  <script src="downloads_page.js"></script>
</dom-module>
