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

<script>
export default {
  props: {
    minimized: {
      type: Boolean,
      default: false,
    },
    label: {
      type: String,
    },
  },
};
</script>

<style scoped>
.arrow {
  font-family: "EBI-Common";
  font-size: 16px;
}
button {
  display: flex;
  align-items: center;
  text-align: center;
  padding: 10px;
  padding-left: 2px;
  width: min-content;
  text-overflow: ellipsis;
  height: 1em;
  background: var(--neutral);
  color: gray;
}
button:hover {
  color: white;
}
.label {
  margin-left: 1em;
  white-space: nowrap;
}
</style>