<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="./doorlockManage.css">
    <style type="text/css">
        [v-cloak]{
            display: none;
        }
    </style>
    <script type="text/javascript" src="../../lib/js/start.js"></script>
    <script type="text/javascript" src="../../lib/js/p.js"></script>
    <script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body ontouchstart="">

    <div id="app" v-cloak>
        <div class="header">
            <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>           
            <p>{{ $t('title.doorlockManage') }}</p>  
        </div> 
        <div class="content"> 
            <ul class="doorlockManage">
                <v-touch tag="li" class="name" v-bind:class="[{'nameDisabled': role}]" v-on:tap="onEditNameTap">
                    {{ $t('doorlockManage.name') }}
                    <p>{{ textNickname }}</p>
                </v-touch>
                <li v-show="!role">
                    {{ $t('doorlockManage.doorbellMsgPush') }}
                    <u-switch :value="valueDoorbell" :init-param="componentsConfig.doorbellSwitch.initParam" v-on:u-switch-tap="onDoorbellSwitchTap(arguments[0])"></u-switch>
                </li>
                <li v-show="!role">
                    {{ $t('doorlockManage.alarmMsgPush') }}
                    <u-switch :value="valueAlarm" :init-param="componentsConfig.alarmSwitch.initParam" v-on:u-switch-tap="onAlarmSwitchTap(arguments[0])"></u-switch>
                </li>
                <li v-show="!role">
                    {{ $t('doorlockManage.opendoorMsgPush') }}
                    <u-switch :value="valueOpendoor" :init-param="componentsConfig.opendoorSwitch.initParam" v-on:u-switch-tap="onOpendoorSwitchTap(arguments[0])"></u-switch>
                </li>
            </ul>    
            <u-button :init-param="componentsConfig.unbindDoorlockButton.initParam" v-on:u-button-tap="onUnbindDoorlockButtonTap"></u-button>
        </div>
        <transition name="fade">
            <v-touch tag="div" class="unbindState-dialog" v-show="stateShowFlag" v-on:tap="onUnbindStateDialogTap">
                <div>
                    <p><img src="../../resources/image/green_unbindSuccess_icon.png">{{ showMsg }}</p>
                </div>
            </v-touch>
        </transition>         
        <transition name="fade">
	        <div class="u-dialog custom-dialog"v-show="unbindShowDialog">
	            <div class="u-dialog-box">
	                <div class="u-dialog-content">
	                	<img src='../../resources/image/green_unbind_icon.png'>
	                	{{$t('doorlockManage.unbindDialogTip')}}
	                	<u-switch :value="valueIsClear" :init-param="componentsConfig.isClearSwitch.initParam" v-show="!role"
	                		v-on:u-switch-tap="onIsClearSwitchTap(arguments[0])"></u-switch>
	                </div>
	                <ul class="u-dialog-button">
	                    <v-touch tag="li" class="u-dialog-cancel" v-on:tap="onCancelTap()">{{ $t('dialog.cancel') }}
	                    </v-touch>
	                    <v-touch tag="li" class="u-dialog-confirm" v-on:tap="onConfirmTap()">{{ $t('dialog.confirm') }}
	                    </v-touch>
	                </ul>
	            </div>
	        </div>
	    </transition>
        <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
        <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
    </div>

    <script type="text/javascript" src="./index.js" defer async></script>
    
</body>
</html>