<link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-checkbox.html">
<link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_indicator.html">
<link rel="import" href="chrome://md-settings/pref_tracker/pref_tracker.html">

<dom-module id="settings-checkbox">
  <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css">
  <link rel="import" type="css" href="settings_checkbox.css">
  <template>
    <cr-events id="events"></cr-events>
    <settings-pref-tracker pref="[[pref]]"></settings-pref-tracker>

    <div id="outerDiv" class="layout horizontal center">
      <paper-checkbox id="checkbox" checked="{{checked}}"
          disabled="[[checkboxDisabled_(disabled, pref)]]">
        <div id="mainLabel">{{label}}</div>
        <div id="subLabel">{{subLabel}}</div>
      </paper-checkbox>
      <template is="dom-if" if="[[pref.policySource]]">
        <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator>
      </template>
    </div>
  </template>
  <script src="settings_checkbox.js"></script>
</dom-module>
