<template>
  <card title="理赔流程" :option="more ? ['了解更多理赔信息'] : null" @option-click="openFrame">
    <div class="cps-process-list">
      <div class="cps-process-list-item" v-for="(item, index) in processData" :key="index">
        <div class="cps-process-list-item-title">{{ index + 1 }}</div>
        <div class="cps-process-list-item-content">
          <h6>{{ item.title }}</h6>
          <div class="txt" v-html="item.desc"></div>
        </div>
      </div>
    </div>
  </card>
</template>

<script>
import Card from "@/components/Card";
export default {
  name: "CpsProcess",
  components: {
    Card
  },
  props: {
    processData: {
      type: Array,
      default() {
        return [];
      }
    },
    more: {
      type: Boolean,
      default: true
    }
  },
  methods: {
    openFrame() {
      this.$emit("click", 5);
    }
  }
};
</script>

<style lang="less" scoped>
@import "../../../../style/var.less";
.cps-process {
  &-list {
    &-item {
      display: flex;
      padding-bottom: 16px;
      position: relative;
      &::after {
        content: " ";
        display: block;
        position: absolute;
        top: 35px;
        left: 13px;
        width: 0;
        height: 100%;
        border-left: 1px solid #d8d8d8;
        z-index: 5;
      }
      &-title {
        font-size: @font-size-12;
        font-weight: @font-weight-bold;
        color: @black;
        width: 19px;
        height: 19px;
        margin: 30px 20px 0 4px;
        background-color: @orange-light;
        border-radius: @border-radius-max;
        line-height: @line-height-md;
        text-align: center;
        line-height: 19px;
        position: relative;
        z-index: 6;
      }
      &-content {
        flex: 1;
        background-color: #f6f6f6;
        border-radius: @border-radius-sm / 2 @border-radius-md;
        padding: @padding-sm;
        position: relative;
        h6 {
          color: @orange-dark;
          font-weight: @font-weight-bold;
          font-size: @font-size-14;
          line-height: @line-height-sm + 2;
        }
        div.txt {
          margin-top: 6px;
          color: @gray-5;
          font-size: @font-size-12;
          line-height: @line-height-sm + 2;
        }
      }
      &:last-child {
        color: #fff;
        padding-bottom: 0;
        &::after {
          display: none;
        }
      }
    }
  }
}
</style>
