blob: 2afc30f78fb23a3b501e68820944e08e20fb5b44 [file] [log] [blame]
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_indicator.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<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="chrome://resources/polymer/v1_0/neon-animation/neon-animatable.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/paper-toggle-button.html">
<link rel="import" href="../i18n_setup.html">
<link rel="import" href="../icons.html">
<link rel="import" href="../prefs/prefs.html">
<link rel="import" href="../settings_page/settings_animated_pages.html">
<link rel="import" href="../settings_page/settings_subpage.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="bluetooth_subpage.html">
<dom-module id="settings-bluetooth-page">
<template>
<style include="settings-shared">
</style>
<settings-animated-pages id="pages" section="bluetooth">
<neon-animatable route-path="default">
<div class="settings-box two-line" actionable on-tap="onTap_">
<iron-icon icon="[[getIcon_(bluetoothEnabled_)]]"></iron-icon>
<div class="middle">
$i18n{bluetoothPageTitle}
<div class="secondary" id="bluetoothSecondary">
[[getDescription_(bluetoothEnabled_)]]
</div>
</div>
<cr-policy-pref-indicator
pref="[[prefs.cros.device.allow_bluetooth]]"
hidden="[[prefs.cros.device.allow_bluetooth.value]]">
</cr-policy-pref-indicator>
<button class="subpage-arrow" is="paper-icon-button-light"
on-tap="onSubpageArrowTap_" aria-label="$i18n{bluetoothPageTitle}"
aria-describedby="bluetoothSecondary">
</button>
<div class="secondary-action">
<paper-toggle-button id="enableBluetooth"
checked="{{bluetoothEnabled_}}"
disabled="[[!adapterState_.available]]" on-tap="stopTap_">
</paper-toggle-button>
</div>
</div>
</neon-animatable>
<template is="dom-if" route-path="/bluetoothDevices">
<settings-subpage associated-control="[[$$('#bluetoothDevices')]]"
page-title="$i18n{bluetoothPageTitle}">
<settings-bluetooth-subpage
adapter-state="[[adapterState_]]"
bluetooth-enabled="{{bluetoothEnabled_}}"
bluetooth="[[bluetooth]]"
bluetooth-private="[[bluetoothPrivate]]">
</settings-bluetooth-subpage>
</settings-subpage>
</template>
</settings-animated-pages>
</template>
<script src="bluetooth_page.js"></script>
</dom-module>