<template>
  <div class="mc-introduction" :class="[align, background]">
    <div class="mc-introduction-logo-container">
      <img :src="logoImg" :alt="title" />
      <div class="mc-introduction-title">{{ title }}</div>
    </div>
    <div class="mc-introduction-sub-title">{{ subTitle }}</div>
    <div class="mc-introduction-description">
      <div v-for="(item, index) in description" :key="index">{{ item }}</div>
    </div>
    <slot></slot>
  </div>
</template>

<script setup lang="ts">
import { props } from './introduction-types';

defineProps(props);
</script>

<style scoped lang="scss">
@import 'devui-theme/styles-var/devui-var.scss';

.mc-introduction {
  display: flex;
  gap: 12px;
  flex-direction: column;
  color: $devui-text;

  .mc-introduction-logo-container {
    display: flex;
    align-items: center;
    gap: 8px;

    img {
      width: 80px;
      height: 80px;
    }

    .mc-introduction-title {
      font-weight: 700;
      font-size: 36px;
      letter-spacing: 1px;
    }
  }

  .mc-introduction-sub-title {
    font-weight: 500;
    font-size: 18px;
  }

  .mc-introduction-description {
    font-size: $devui-font-size-sm;
    text-align: center;

    & > div {
      line-height: 1.5;
    }
  }

  &.filled {
    background-color: $devui-global-bg;
    border-radius: 8px;
    padding: 8px 12px;
  }

  &.center {
    align-items: center;
  }

  &.left {
    align-items: flex-start;
  }

  &.right {
    align-items: flex-end;
  }
}
</style>
