<script setup>
import { contentModel } from '@jy/data-models'

const headerType = '业主委托项目'

const keepLabel = [
  {
    label: '采购',
    link: ''
  },
  {
    label: '政务',
    link: ''
  }
]
</script>

<template>
  <div class="common-content-header">
    <div class="before-type" v-if="contentModel.isSelfSite">
      {{ headerType }}
    </div>
    <h1 class="title">{{ contentModel.title }}</h1>
    <div class="tags">
      <a
        :href="item.link"
        v-for="(item, index) in contentModel.tags"
        :key="index"
        >{{ item.label }}</a
      >
    </div>
    <div class="actions-info">
      <div class="time-label">{{ contentModel.time }}</div>
      <div class="actions">
        <div class="action-item">
          <span class="iconfont icon-fenxiang"></span>
        </div>
        <div class="action-item">
          <span class="iconfont icon-canbiao"></span>
        </div>
        <div class="action-item">
          <span class="iconfont icon-weixin_line"></span>
        </div>
        <div class="action-item">
          <span class="iconfont icon-shoucang_weishoucang"></span>
          <span class="iconfont icon-shoucang"></span>
        </div>
      </div>
    </div>
    <div class="expands-info">
      <div class="ent-features">
        <span class="iconfont icon-ren"></span>
        参标人：秦月、张翰等
      </div>
      <div class="favorite-tags">
        个人标签：
        <a v-for="(item, index) in keepLabel" :key="index" :href="item.link">
          {{ item.label }}
        </a>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.common-content-header {
  position: relative;
  width: 980px;
  margin: 0 auto;
  background-color: #fff;
  padding: 32px 40px;
  border-radius: 8px;
  .before-type {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: inline-block;
    color: #ff3a20;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    padding: 2px 12px;
    background-color: rgba(255, 58, 32, 0.1);
    border-top-left-radius: 8px;
    border-bottom-right-radius: 12px;
  }
  .title {
    color: #252627;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 36px;
  }
  .tags {
    margin-top: 12px;
  }
  .tags a {
    border-radius: 4px;
    border: 1px solid #ececec;
    background: #f5f5fb;
    padding: 1px 8px;
    color: #686868;
    text-align: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;
    text-decoration: none;
    &[href*='javascript'] {
      cursor: unset;
    }
    & + a {
      margin-left: 8px;
    }
  }
  .base-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .actions-info {
    @extend .base-flex;
    margin-top: 8px;
    .time-label {
      color: #999;
      font-size: 12px;
      font-style: normal;
      font-weight: 400;
      line-height: 18px;
    }
    .actions {
      display: flex;
      flex-direction: row;
      align-items: center;
      .iconfont {
        font-size: 18px;
        color: #9b9ca3;
      }
    }
  }
  .expands-info {
    margin-top: 8px;
    @extend .base-flex;
    .icon-ren {
      font-size: 18px;
      color: #2abed1;
    }
  }
}
</style>
