<template>
  <div id="footer-navigation" :class="{'iphoneX':isX}">
    <ul>
      <li class="navApply" v-show="!applyStatus" v-on:click="redirectIndex"><img src="./assets/icon_sign_nor.png"><span>活动报名</span></li>
      <li class="navApply" v-show="applyStatus"><img src="./assets/icon_sign_sel.png"><span class="active">活动报名</span></li>
      <li class="navLine"></li>
      <li v-show="!toolStatus" v-on:click="redirectTool"><img src="./assets/icon_tool_nor.png"><span>活动工具</span></li>
      <li v-show="toolStatus"><img src="./assets/icon_tool_sel.png"><span class="active" >活动工具</span></li>
      <li class="navLine"></li>
      <li class="navMine" v-show="!mineStatus" v-on:click="redirectMine"><img src="./assets/icon_mine_nor.png"><span>个人中心</span></li>
      <li class="navMine" v-show="mineStatus" ><img src="./assets/icon_mine_sel.png"><span class="active">个人中心</span></li>
    </ul>
  </div>
</template>
<script>
  export default {
    data () {
      return {
      }
    },
    props: {
      applyStatus: {
        type: Boolean,
        required: true,
        default: false
      },
      mineStatus: {
        type: Boolean,
        required: true,
        default: true
      },
      toolStatus: {
        type: Boolean,
        required: true,
        default: true
      },
      isX: false
    },
    mounted () {
    },
    methods: {
      redirectIndex () {
        this.$router.push({name: 'index'})
      },
      redirectTool () {
        this.$router.push({name: 'tool'})
      },
      redirectMine () {
        this.$router.push({name: 'mine'})
      }
    }
  }
</script>

<style lang="scss">
  .iphoneX{
    padding-bottom: 20px;
  }
  #footer-navigation{
    width: 100%;
    position: fixed;
    left: 0;
    bottom: 0;
    background: #FFFFFF;
    z-index: 9999;
    border-top: 1px solid #979797;
    ul{
      display: flex;
      justify-content: space-around;
      width: 100%;
      margin: 0;
      padding: 1px 0 5px 0;
      li{
        padding-top: 4px;
        list-style: none;
        display: flex;
        flex-direction:column;
        align-items:center;
        justify-content: center;
        height: 100%;
        position: relative;
        img{
          width: 32px;
        }
        span{
          font-size: 12px;
          color: #282B2F;
          display:block;
        }
        .active{
          color: #44D7B6;
        }
      }
      .navLine{
        width: 1px;
        height: 15px;
        background: #979797;
        margin-top: 14px;
      }
      .navApply{
        padding-left: 15px;
      }
      .navMine{
        padding-right: 15px;
      }
    }
  }
</style>