<template>
  <div class="guide-checklist">
    <div
      v-for="(item, i) in items"
      :key="i"
      class="checklist-item"
      :class="{ 'checklist-item--important': item.important }"
    >
      <span class="checklist-mark">{{ item.important ? '☑' : '☐' }}</span>
      <span class="checklist-text">{{ item.text }}</span>
    </div>
  </div>
</template>

<script setup>
defineProps({
  items: { type: Array, required: true },
})
</script>

<style lang="less" scoped>
.guide-checklist {
  display: flex;
  flex-direction: column;
  gap: @space-sm;
}

.checklist-item {
  display: flex;
  gap: @space-sm;
  padding: @space-sm @space-md;
  border-left: 2px solid @color-border;
  line-height: @line-height-base;

  &--important {
    border-left-color: @color-primary;
  }
}

.checklist-mark {
  flex-shrink: 0;
  color: @color-primary;
}

.checklist-text {
  font-size: @font-size-sm;
  color: @color-text-secondary;

  .checklist-item--important & {
    color: @color-text-primary;
  }
}
</style>
