<template>
  <div style="padding-bottom: 10px">
    <div class="vb-body-right-option pointer option-head">Action</div>

    <div class="container vb-p-10">
      <!-- Link -->
      <!-- {{widgetData.style}} -->
      <div class="row">
        <div class="col-md-12">
          <div class="input-group mb-3">
            <div class="input-group-prepend">
              <span class="input-group-text" id="basic-addon1">Button</span>
            </div>
            <input
              type="text"
              v-model="widgetData.text.buttonText"
              class="form-control"
              aria-label="Username"
              aria-describedby="basic-addon1"
            />
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-md-6">
          <div>
            <span class="font-12 right-45">Button Color</span>
          </div>
          <colorpicker
            class="right-45"
            :color="widgetData.style.buttoncolor"
            v-model="widgetData.style.buttoncolor"
          />
        </div>
        <div class="col-md-6">
          <div>
            <span class="font-12">Button Text Color</span>
          </div>
          <div>
            <colorpicker
              :color="widgetData.style.buttonTextColor"
              v-model="widgetData.style.buttonTextColor"
            />
          </div>
        </div>
      </div>
      <!-- <div class="row">
                <div class="col-md-6">
                    <div><span class="font-12 right-45">Button Hover Color</span></div>
                    <colorpicker class="right-45" :color="widgetData.style.buttonHoverColor" v-model="widgetData.style.buttonHoverColor" />
                </div>
                <div class="col-md-6">
                    <div><span class="font-12 right-45">Button Hover Text Color</span></div>
                    <colorpicker class="right-45" :color="widgetData.style.ButtonHoverTextColor" v-model="widgetData.style.ButtonHoverTextColor" />
                </div>
      </div>-->
      <div class="row">
        <div class="col-md-6">
          <div>
            <span class="font-12 right-45">Button Border Color</span>
          </div>
          <colorpicker
            class="right-45"
            :color="widgetData.style.ButtonBorderColor"
            v-model="widgetData.style.ButtonBorderColor"
          />
        </div>
        <div class="col-md-6">
          <div>
            <span class="font-12">border Width</span>
          </div>
          <div>
            <InputButton
              v-on:leftButton="globalAdd(widgetData.style.ButtonBorder > 0 ? --widgetData.style.ButtonBorder : widgetData.style.ButtonBorder)"
              v-on:rightButton="globalAdd(++widgetData.style.ButtonBorder)"
              v-on:onInput="widgetData.style.ButtonBorder = $event"
              :value="widgetData.style.ButtonBorder"
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import colorpicker from "./common/color-picker";
import InputButton from "./common/input-button";
export default {
  props: {
    widgetData: Object
  },
  components: {
    colorpicker,
    InputButton
  },
  data() {
    return {
      imagetaboption: [
        {
          value: null,
          text: "Same Tab"
        },
        {
          value: "_blank",
          text: "New Tab"
        }
      ]
    };
  },
  methods: {
    globalAdd(value) {
      this.widgetData.style.ButtonBorder = value;
    }
  }
};
</script>

<style>
</style>
