<template>
  <button type="button" class="button" @click="$emit('click')">
    <template>
      <span v-if="!minimized" class="arrow"></span>
      <span v-else class="arrow"></span>
    </template>
    <span class="label">{{ label }}</span>
    <Hint class="hint" :text="workflowDescription" />
  </button>
</template>

<script>
import Hint from "./Hint";
export default {
  props: {
    minimized: {
      type: Boolean,
      default: false,
    },
    label: {
      type: String,
    },
    workflowDescription: {
      type: String,
    },
  },
  components: {
    Hint,
  },
};
</script>

<style scoped>
.arrow {
  font-family: "EBI-Common";
  font-size: 20px;
}
button {
  display: flex;
  align-items: center;
  text-align: center;
  padding: 10px;
  padding-left: 7px;
  width: 100%;
  background: grey;
  color: var(--neutral);
  text-overflow: ellipsis;
  height: 1.5em;
}
button:hover {
  color: white;
}
.label {
  margin-left: 1em;
  white-space: nowrap;
}
.hint {
  margin-left: auto;
  margin-right: 0.3em;
  font-size: smaller;
}
</style>