<template>
  <div
    class="block-header"
    :class="{ _sticky: sticky, '_with-bullet': withBullet }"
  >
    <span>
      <slot />
    </span>
  </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';

@Component
export default class BlockHeader extends Vue {
  @Prop({ default: true }) sticky: boolean;
  @Prop({ default: true }) withBullet: boolean;
}
</script>

<style lang="scss" scoped>
.block-header {
  padding-top: 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  z-index: 1;

  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.015em;
  color: rgba(2, 12, 18, 0.9);

  &._sticky {
    position: sticky;
    top: 16px;
  }
  &._with-bullet {
    &::before {
      content: '';
      display: inline-block;
      position: absolute;
      width: 56px;
      left: -8px;
      top: 4px;
      bottom: 4px;
      background: #eef7fc;
      border-radius: 0px 24px 24px 0px;
      z-index: -1;
    }
  }
}
</style>
