import { FunctionTrigger } from '$mixins/trigger/class/index';

import personalDetail from '$utils/control/personal-detail/index';

export default [
    {
        label:'下单',
        icon:require('../images/order.png'),
        where:'is_player',
        trigger:new FunctionTrigger(function (){
            return  this.placeOrder();
        })
    },
    {
        label: '资料',
        icon:require('../images/user-data.png'),
        where:'is_player',
        trigger:new FunctionTrigger(function (){
            if (this.userInfo && this.userInfo.uid && this.userInfo.pid) {
                personalDetail.openDetail(this.userInfo);
            }
        })
    },
    {
        label: '关注',
        icon:require('../images/user-follow.png'),
        activeIcon: require('../images/user-follow-active.png'),
        key:'follow',
        trigger: new FunctionTrigger(function (){
            this.toggleFollow();
        })
    }
]