<template>
  <div class="progress">
    <div
      v-for="idx in 6"
      :key="idx"
      class="node"
      :class="{
        active: curIdx === idx - 1,
      }"
    >
      <div
        class="outer-ring"
      />
    </div>
    <div class="line" />
  </div>
</template>

<script setup>
defineProps(['curIdx'])

const {
  windowSizeInCssForRef,
  windowSizeWhenDesignForRef,
} = useSizeAdapt()

</script>

<style lang="less" scoped>
.progress{
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  >.node{
    width: calc(9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
    height: calc(9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
    border-radius: 50%;
    background: #BFAA94;
    position: relative;
    z-index: 1;
    >.outer-ring{
      display: none;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      border: 1px dashed #FFE096;
      width: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
      height: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));;
    }
  }
  >.node.active{
    background: rgba(255, 224, 150, 1);
    >.outer-ring{
      display: initial;
    }
  }
  >.line{
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height:0;
    border-top: 1px dashed #BFAA94;
    transform: translateY(-50%);
    z-index: 0;
  }
}
</style>