<ion-view view-title="Profile" >
    <ion-nav-buttons side="left">
        <button class="button back-button buttons button-clear header-item " ng-click="vm.goBack()">
            <i class="icon ion-arrow-left-c"></i> 
        </button>
    </ion-nav-buttons>
    <ion-content>
         <ion-refresher
            pulling-text="Obnoviť..."
            on-refresh="vm.loadProfile()"
            spinner="ripple">
        </ion-refresher>
        <div class="profile-panel">
            <div class='column'>
                <p class="liner">{{vm.data.userType === "driver" ? "Vozidlo" : "Užívateľ"}}</p> 
                <div class='profile-item'>
                    <img src="{{vm.data.photo|| 'img/car.png'}}"/>
                </div>
                <div class='profile-item'>
                    <h2>{{vm.data.evidenceNumber ? vm.data.evidenceNumber : vm.data.username}}</h2>
                </div>
                <div class='profile-item'>
                    <p>{{vm.data.brand}} {{vm.data.model}}</p>
                </div>
                <div class='profile-item'>
                    <i class="ion ion-heart"></i> {{vm.data.trust}} 
                </div>                
                <div>
                    <button class="button button-full button-assertive" ng-disabled="vm.isItMe" 
                            ng-controller="NewChatCtrl as vmm" ng-click="vmm.newChat(vm.data, {backToChat: true})">
                        {{vm.isItMe ? "Sám sebe sa nepíše": "Správa"}}
                    </button>
                    <button class="button button-full button-dark disabled">
                        Kompliment alebo odkaz
                    </button>
                    <button class="button button-full button-dark disabled">
                        Hodnotenie
                    </button>
                </div>
            </div>
        </div>
    </ion-content>

</ion-view>
