<script setup lang="ts">
defineProps<{
  message: string;
}>();
</script>

<template>
  <div class="chat-error-notice" role="alert">
    <span class="chat-error-notice__icon" aria-hidden="true">!</span>
    <span>{{ message }}</span>
  </div>
</template>

<style scoped>
.chat-error-notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: min(78%, 680px);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 20px;
  color: var(--el-color-danger);
  background: var(--el-color-danger-light-9);
  border: 1px solid var(--el-color-danger-light-7);
  border-radius: 8px;
}

.chat-error-notice__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid currentColor;
  border-radius: 50%;
}
</style>
