<template>
  <custom-modal v-model="visible" :width="400" title="Processing Monitor" :footer="null">
    <div class="processing">
      <div>
        <!-- 标题 -->
        <div class="processing-title">Calibration Updates</div>
        <!-- 列表 -->
        <div class="processing-list">
          <div class="processing-list-item">
            <status :status="0" />
            <div class="description">Energy - Mariscotti Centroids</div>
          </div>
          <div class="processing-list-item">
            <status :status="0" />
            <div class="description">Resolution</div>
          </div>
          <div class="processing-list-item">
            <status :status="0" />
            <div class="description">Energy - Fitted Centroids</div>
          </div>
        </div>
      </div>
      <div style="margin-top: 20px;">
        <!-- 标题 -->
        <div class="processing-title">Spectrum Analysis</div>
        <!-- 列表 -->
        <div class="processing-list">
          <div class="processing-list-item">
            <status :status="0" />
            <div class="description">Peak Search</div>
          </div>
          <div class="processing-list-item">
            <status :status="0" />
            <div class="description">Baseline Fitting</div>
          </div>
          <div class="processing-list-item">
            <status :status="1" />
            <div class="description">Net Area Fitting</div>
          </div>
          <div class="processing-list-item">
            <status :status="2" />
            <div class="description">Nuclide Identification</div>
          </div>
          <div class="processing-list-item">
            <status :status="2" />
            <div class="description">Activity and MDA</div>
          </div>
          <div class="processing-list-item">
            <status :status="2" />
            <div class="description">QC Test</div>
          </div>
        </div>
      </div>
    </div>
  </custom-modal>
</template>

<script>
import Status from './components/status.vue'
export default {
  components: {
    Status
  },
  props: {
    value: {
      type: Boolean
    }
  },
  computed: {
    visible: {
      get() {
        return this.value
      },
      set(val) {
        this.$emit('input', val)
      }
    }
  }
}
</script>

<style lang="less" scoped>
@color: #325050;
.processing {
  &-title {
    height: 32px;
    line-height: 32px;
    background-color: @color;
    text-align: center;
  }

  &-list {
    &-item {
      margin-top: 20px;
      display: flex;
      gap: 20px;
      height: 26px;
      line-height: 26px;

      .description {
        flex: 1;
        background-color: @color;
        text-align: center;
      }
    }
  }
}
</style>
