<template>
  <div class="btn-container">
    <div class="btn-wrap">
      <div v-for="(btn, index) in buttons" :key="index" :style="style(index)" class="btn">
        <text @click="btn.clicked" class="text">{{btn.text}}</text>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props:{
      buttons:{
        type:Array,
        default:[]
      }
    },
    methods:{
      style(index){
        if(index == 0){
          return {
          'border-style': 'solid',
          'border-width': '1.4px',
          'border-top-left-radius': '10px',
          'border-bottom-left-radius': '10px'
          }
        }
        if(index == this.buttons.length -1){
          return {
          'border-style': 'solid',
          'border-width': '1.4px',
          'border-left-width': '0px',
          'border-top-right-radius': '10px',
          'border-bottom-right-radius': '10px'
          }
        }
        return {
          'border-style': 'solid',
          'border-width': '1.4px',
          'border-left-width': '0px'
        }
      }
    }
  }
</script>

<style scoped>
  .btn-container{
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
  .btn-wrap{
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 690px;
    height: 80px;
  }
  .btn{
    justify-content: center;
    flex: 1;
    border-color: #ffffff;
    background-color: #399de2;
    color:#ffffff;
  }
  .btn-plain{
    justify-content: center;
    flex: 1;
    border-color: #399de2;
    background-color: #ffffff;
    color: #399de2;
  }
  .text{
    font-size: 30px;
    text-align: center;
    color:#ffffff;
  }
  .text-plain{
    font-size: 30px;
    text-align: center;
    color: #399de2;
  }
</style>
