blob: 7086ec640ad98c475ce60fd14469fef6d99f75be [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_tooltip_icon.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toggle/cr_toggle.html">
<!-- TODO(jshikaram): use toggle-row here. -->
<dom-module id="app-management-permission-toggle">
<template>
<style>
:host {
align-items: center;
display: flex;
}
#policy-indicator {
fill: var(--google-grey-refresh-700);
padding-inline-end: 12px;
}
</style>
<template is="dom-if"
if="[[isPermissionManaged_(app, permissionType)]]">
<iron-icon id="policy-indicator" icon="cr:domain" tabindex="0"
aria-describedby="tooltip">
</iron-icon>
<paper-tooltip id="tooltip" for="policy-indicator"
position="top" fit-to-visible-bounds>
$i18n{controlledByPolicy}
</paper-tooltip>
</template>
<cr-toggle checked="[[getPermissionValueBool_(app, permissionType)]]"
on-change="togglePermission_"
disabled$="[[isPermissionManaged_(app, permissionType)]]">
</cr-toggle>
</template>
<script src="permission_toggle.js"></script>
</dom-module>