<template>
  <div class="container">
    <div class="mask" @click="handleClose"></div>
    <div class="petrol">
      <!-- 名称区域 -->
      <div class="title" :title="currentPetrol">{{ currentPetrol }}</div>

      <!-- 信息盒子区域 -->
      <div class="info">
        <div class="info_box">营业时间：00:00 - 24:00</div>
        <div class="info_box">成品油种类：92/95/98/柴油</div>
        <div class="info_box">
          服务类型：
          <img src="@/assets/images/60.png" />
          <img src="@/assets/images/61.png" />
          <img src="@/assets/images/62.png" />
          <img src="@/assets/images/63.png" />
        </div>
      </div>
      <!-- 关闭按钮区域 -->
      <div class="close" @click="handleClose"></div>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps(["currentPetrol"]);
const $emit = defineEmits(["closeDialog"]);

// 点击关闭按钮回调
const handleClose = () => {
  $emit("closeDialog", false);
};
</script>

<style lang="scss" scoped>
.container {
  z-index: 9999;
  position: absolute;
  top: -151px;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 7072px;
  height: 1872px;
  background-color: rgba($color: #000000, $alpha: 0.4);

  .mask {
    position: absolute;
    top: 0px;
    left: 0;
    width: 7072px;
    height: 1872px;
  }

  .petrol {
    position: relative;
    width: 668px;
    height: 401px;
    background-image: url(@/assets/images/56.png);
    background-size: 100% 100%;

    .title {
      margin-top: 3px;
      margin-left: 230px;
      padding: 0 20px;
      width: 224px;
      height: 46px;
      line-height: 46px;
      text-align: center;
      color: #ffeb3b;
      font-size: 24px;
      font-weight: bold;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .info {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      padding: 60px 0;
      margin-top: 8px;
      margin-left: 37px;
      width: 604px;
      height: 307px;
      font-size: 23px;

      .info_box {
        display: flex;
        align-items: center;
        padding-left: 22px;
        width: 530px;
        height: 47px;
        border-left: 2px solid #90cffc;
        border-top: 0.1px dashed rgba(0, 186, 186, 0.3);
        border-bottom: 1px dashed rgba(0, 186, 186, 0.3);
        border-right: 1px dashed rgba(0, 186, 186, 0.3);
        background-color: rgba(109, 161, 189, 0.21);

        img {
          margin-right: 15px;
          width: 30px;
          height: 30px;
        }
      }
    }

    .close {
      position: absolute;
      top: 10px;
      right: 6px;
      width: 42px;
      height: 42px;
      cursor: pointer;
      background-image: url(@/assets/images/12.png);
      background-size: 100% 100%;
    }
  }
}
</style>
