<template>
  <div class="leftMenu">
    <div
      class="leftMenuTitle"
      :style="{
        width: leftMenuShow ? '340px' : '64px',
      }"
    >
      <a-tooltip placement="right">
        <template #title> {{ props.pathRecord.name }} </template>
        <div class="title">{{ props.pathRecord.name }}</div>
      </a-tooltip>
    </div>
    <div class="leftMenuContent">
      <div class="leftMenuContent_1">
        <div class="leftMenu_closeButton">
          <a-tooltip placement="right">
            <template #title> 关闭弹窗 </template>
            <CloseOutlined
              style="font-size: 24px; margin: 8px; color: white"
              @click="closePathModal"
            />
          </a-tooltip>
        </div>
        <div class="leftMenu_buttonList">
          <div
            class="leftMenu_buttonList_annotation"
            :style="{
              background: showMenuInfoName == '地图标注' ? '#2D8CF0' : '#1a375a',
            }"
            @click="
              showMenuInfoName = '地图标注';
              updateShowMenuInfoList(showMenuInfoName);
              showMenuInfoList = filterAfterAnnotationDataList;
            "
          >
            <a-tooltip placement="right">
              <template #title> 地图标注 </template>
              <AntDesignOutlined style="font-size: 24px; margin: 8px; color: white" />
            </a-tooltip>
          </div>
          <div
            class="leftMenu_buttonList_image"
            :style="{
              background: showMenuInfoName == '地图照片' ? '#2D8CF0' : '#1a375a',
            }"
            @click="
              showMenuInfoName = '地图照片';
              updateShowMenuInfoList(showMenuInfoName);
            "
          >
            <a-tooltip placement="right">
              <template #title> 地图照片 </template>
              <EnvironmentOutlined style="font-size: 24px; margin: 8px; color: white" />
            </a-tooltip>
          </div>
          <div
            class="leftMenu_buttonList_area"
            :style="{
              background: showMenuInfoName == '地图作业区域' ? '#2D8CF0' : '#1a375a',
            }"
            @click="
              showMenuInfoName = '地图作业区域';
              updateShowMenuInfoList(showMenuInfoName);
              showMenuInfoList = filterAfterAreaDataList;
            "
          >
            <a-tooltip placement="right">
              <template #title> 地图作业区域 </template>
              <CodeSandboxOutlined style="font-size: 24px; margin: 8px; color: white" />
            </a-tooltip>
          </div>
        </div>
      </div>
      <div class="leftMenuContent_2" v-if="leftMenuShow">
        <div class="leftMenuContent_title">
          {{ showMenuInfoName }}
        </div>
        <div class="leftMenuContent_list">
          <!-- 地图作业区域 -->
          <div v-if="showMenuInfoName == '地图作业区域'" style="margin: 10px">
            <a-select
              v-model:value="areatype"
              style="width: 120px; margin-right: 15px"
              @change="handleChangeAreaSelect"
            >
              <a-select-option value="all">全部类型</a-select-option>
              <a-select-option value="dfence">全部作业区</a-select-option>
              <a-select-option value="nfz">全部限飞区</a-select-option>
              <a-select-option value="noland">全部禁降区</a-select-option>
            </a-select>
            <a-select
              v-model:value="areastate"
              style="width: 120px"
              @change="handleChangeAreaSelect"
            >
              <a-select-option value="all">全部状态</a-select-option>
              <a-select-option value="0">已启用</a-select-option>
              <a-select-option value="1">已禁用</a-select-option>
            </a-select>
          </div>
          <!-- 列表 -->
          <div v-for="show in showMenuInfoList" :key="show.id">
            <!-- 地图标注 -->
            <div
              v-if="showMenuInfoName == '地图标注'"
              class="showMenuInfo_annotation"
              :style="{
                background:
                  props.nowShowAnnotationData && props.nowShowAnnotationData.id == show.id
                    ? '#274D75'
                    : show.mouse
                      ? '#393939'
                      : '',
              }"
              @mouseenter="
                show.mouse = true;
                show.deleteClickNum = 0;
              "
              @mouseleave="
                show.mouse = false;
                show.deleteClickNum = 0;
              "
            >
              <div @click="setNowShowAnnotationData(show)">
                <AntDesignOutlined v-if="show.type == 0" />
                <ExpandAltOutlined v-if="show.type == 1" />
                <BorderOutlined v-if="show.type == 2" />
                <LogoutOutlined v-if="show.type == 3" />
              </div>
              <div
                class="eye"
                @click="show.state == 0 ? hideThisAnnotation(show) : showThisAnnotation(show)"
                :style="{ background: show.state == 0 ? '#2d8cf0' : '#000000' }"
              >
                <EyeOutlined v-if="show.state == 0" style="color: #ffffff; font-size: 16px" />
                <EyeInvisibleOutlined
                  v-if="show.state == 1"
                  style="color: #ffffff; font-size: 16px"
                />
              </div>
              <div @click="setNowShowAnnotationData(show)">{{ show.name }}</div>
              <div class="buttonRight2" v-if="show.mouse">
                <a-tooltip placement="top">
                  <template #title>
                    <span>回中</span>
                  </template>
                  <AimOutlined @click="handlerLocation(show)" />
                </a-tooltip>
              </div>
              <div
                class="buttonRight1"
                v-if="show.mouse"
                :style="{ background: show.deleteClickNum == 1 ? '#FF0000' : '' }"
              >
                <a-tooltip placement="top">
                  <template #title>
                    <span>删除</span>
                  </template>
                  <DeleteOutlined
                    @click="
                      show.deleteClickNum == 1 ? deleteAnnotation(show) : show.deleteClickNum++
                    "
                  />
                </a-tooltip>
              </div>
            </div>
            <!-- 地图照片 -->
            <div
              class="showMenuInfo_image"
              v-if="showMenuInfoName == '地图照片'"
              :style="{
                background:
                  props.nowShowImageData && props.nowShowImageData.id == show.id
                    ? '#274D75'
                    : show.mouse
                      ? '#393939'
                      : '',
              }"
            >
              <FileImageOutlined />
              <div
                class="eye"
                @click="show.is_displayed = !show.is_displayed"
                :style="{ background: show.is_displayed ? '#2d8cf0' : '#000000' }"
              >
                <EyeOutlined v-if="show.is_displayed" style="color: #ffffff; font-size: 16px" />
                <EyeInvisibleOutlined
                  v-if="!show.is_displayed"
                  style="color: #ffffff; font-size: 16px"
                />
              </div>
              <a-tooltip placement="top">
                <template #title>
                  <span> {{ show.name }}</span>
                </template>
                <div
                  :style="{
                    width: show.mouse ? '160px' : '210px',
                    'white-space': 'nowrap',
                    overflow: 'hidden',
                    'text-overflow': 'ellipsis',
                  }"
                  @click="setNowShowImageData(show)"
                >
                  {{ show.name }}
                </div>
              </a-tooltip>
              <div class="buttonRight2" v-if="show.mouse">
                <a-tooltip placement="top">
                  <template #title>
                    <span>回中</span>
                  </template>
                  <AimOutlined @click="handlerLocation(show)" />
                </a-tooltip>
              </div>
              <div class="buttonRight1" v-if="show.mouse">
                <a-tooltip placement="top">
                  <template #title>
                    <span>
                      {{ show.show_on_map ? '在地图上取消加载' : '在地图上加载' }}
                    </span>
                  </template>
                  <div style="display: flex; align-items: center">
                    <svg
                      v-if="show.show_on_map"
                      @click="funAddOrRemoveToMap(show)"
                      xmlns="http://www.w3.org/2000/svg"
                      xmlns:xlink="http://www.w3.org/1999/xlink"
                      viewBox="0 0 24 24"
                      width="18"
                      height="18"
                    >
                      <path
                        d="M19 5v11.17l2 2V5c0-1.1-.9-2-2-2H5.83l2 2H19zM2.81 2.81L1.39 4.22L3 5.83V19c0 1.1.9 2 2 2h13.17l1.61 1.61l1.41-1.41L2.81 2.81zM5 19V7.83l7.07 7.07l-.82 1.1L9 13l-3 4h8.17l2 2H5z"
                        fill="#ffffff"
                      ></path>
                    </svg>
                    <svg
                      v-if="!show.show_on_map"
                      @click="funAddOrRemoveToMap(show)"
                      xmlns="http://www.w3.org/2000/svg"
                      xmlns:xlink="http://www.w3.org/1999/xlink"
                      viewBox="0 0 24 24"
                      width="18"
                      height="18"
                    >
                      <path
                        d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14L6 17h12l-3.86-5.14z"
                        fill="#ffffff"
                      ></path>
                    </svg>
                  </div>
                </a-tooltip>
              </div>
            </div>
            <!-- 地图作业区域 -->
            <div
              v-if="showMenuInfoName == '地图作业区域'"
              class="showMenuInfo_area"
              :style="{
                outline:
                  props.nowShowAreaData && props.nowShowAreaData.id == show.id
                    ? '2px solid #2D8CF0'
                    : '',
                background: props.nowShowAreaData && show.state == 0 ? '#3c3c3c' : '#3c3c3c55',
              }"
            >
              <a-tooltip placement="right">
                <template #title> {{ show.name }} </template>
                <div
                  class="name"
                  @click="setNowShowAreaData(show)"
                  :style="{
                    color: show.state == 0 ? '#ffffff' : '#ffffff55',
                  }"
                >
                  {{ show.name }}
                </div>
              </a-tooltip>
              <div
                class="type"
                @click="setNowShowAreaData(show)"
                :style="{
                  color: show.state == 0 ? '#ffffff' : '#ffffff55',
                }"
              >
                <!-- 自定义禁降区 -->
                <div
                  v-if="show.type == 'noland'"
                  :style="{
                    width: '13px',
                    height: '13px',
                    outline: `2px solid #FF9900`,
                    'margin-right': '6px',
                  }"
                />
                <!-- 自定义作业区 -->
                <div
                  v-if="show.type == 'dfence'"
                  :style="{
                    width: '13px',
                    height: '13px',
                    outline: `2px solid #00FF00`,
                    'margin-right': '6px',
                    'border-radius': show.geomtype == 'Circle' ? '6.5px' : '0px',
                  }"
                />
                <!-- 自定义限飞区 -->
                <div
                  v-if="show.type == 'nfz'"
                  :style="{
                    width: '13px',
                    height: '13px',
                    outline: `2px solid #FF0000`,
                    background: `#FF000055`,
                    'margin-right': '6px',
                    'border-radius': show.geomtype == 'Circle' ? '6.5px' : '0px',
                  }"
                />
                <span>{{ getType(show.type) }}</span>
              </div>
              <div class="buttonlist">
                <div class="button" v-if="show.state == 1">
                  <a-popconfirm
                    title="将会影响到项目内设备的作业范围，是否启用该区域？"
                    ok-text="启用"
                    cancel-text="取消"
                    placement="right"
                    @confirm="enableThisArea(show)"
                  >
                    <a-tooltip placement="top">
                      <template #title>
                        <span>可点击启用该区域</span>
                      </template>
                      <CheckCircleOutlined />
                    </a-tooltip>
                  </a-popconfirm>
                </div>
                <div class="button" v-if="show.state == 0">
                  <a-popconfirm
                    title="将会影响到项目内设备的作业范围，是否禁用该区域？"
                    ok-text="禁用"
                    cancel-text="取消"
                    placement="right"
                    @confirm="disableThisArea(show)"
                  >
                    <a-tooltip placement="top">
                      <template #title>
                        <span>可点击禁用该区域</span>
                      </template>
                      <StopOutlined />
                    </a-tooltip>
                  </a-popconfirm>
                </div>
                <div class="button">
                  <a-tooltip placement="top">
                    <template #title>
                      <span>回中</span>
                    </template>
                    <AimOutlined @click="handlerLocation(show)" />
                  </a-tooltip>
                </div>
                <div class="button">
                  <a-popconfirm
                    title="将会影响到项目内设备的作业范围，是否删除该区域？"
                    ok-text="删除"
                    cancel-text="取消"
                    placement="right"
                    @confirm="deleteArea(show)"
                  >
                    <a-tooltip placement="top">
                      <template #title>
                        <span>删除</span>
                      </template>
                      <DeleteOutlined />
                    </a-tooltip>
                  </a-popconfirm>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="suojinButton" @click="changeLeftMenuShow">
      <DoubleLeftOutlined v-if="leftMenuShow" style="font-size: 16px" />
      <DoubleRightOutlined v-if="!leftMenuShow" style="font-size: 16px" />
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { ref, watch } from 'vue';
  import {
    CloseOutlined,
    AntDesignOutlined,
    DoubleLeftOutlined,
    DoubleRightOutlined,
    EnvironmentOutlined,
    CodeSandboxOutlined,
    ExpandAltOutlined,
    BorderOutlined,
    LogoutOutlined,
    EyeOutlined,
    EyeInvisibleOutlined,
    AimOutlined,
    DeleteOutlined,
    FileImageOutlined,
    CheckCircleOutlined,
    StopOutlined,
  } from '@ant-design/icons-vue';
  import { UpdateWorkArea, UpdateAnnotation } from '@/api/demo/mediaLibrary';
  import { cloneDeep } from 'lodash-es';
  import { useMessage } from '@/hooks/web/useMessage';
  const { createMessage, createConfirm } = useMessage();

  const props = defineProps([
    'pathRecord',
    'leftMenuShow',
    'allAnnotationDataList',
    'nowShowAnnotationData',
    'allImageDataList',
    'nowShowImageData',
    'allAreaDataList',
    'nowShowAreaData',
  ]);
  const emits = defineEmits([
    'changeLeftMenuShow',
    'handlerLocation',
    'closePathModal',
    'changeAnnotationInfoShow',
    'setNowShowAnnotationData',
    'setNowShowImageData',
    'setNowShowAreaData',
    'setAllAreaData',
    'setAllAnnotationData',
    'deleteAnnotation',
    'deleteArea',
  ]);
  const showMenuInfoList = ref(props.allAnnotationDataList);
  const showMenuInfoName = ref('地图标注');
  function updateShowMenuInfoList(type) {
    if (type == '地图标注') {
      handleChangeAnnotationSearch();
    }
    if (type == '地图照片') {
      showMenuInfoList.value = props.allImageDataList;
    }
    if (type == '地图作业区域') {
      handleChangeAreaSelect();
    }
  }

  // 目录-隐藏或者显示
  function changeLeftMenuShow() {
    emits('changeLeftMenuShow');
  }
  // 弹窗-关闭弹窗
  function closePathModal() {
    emits('closePathModal');
  }
  // 地图图片-加载到地图上
  function funAddOrRemoveToMap(show) {
    show.show_on_map = !show.show_on_map;
    if (show.show_on_map) {
      createMessage.success('在地图上加载成功');
    } else {
      createMessage.success('在地图上取消加载成功');
    }
  }

  // 地图标注-搜索
  const filterAfterAnnotationDataList = ref(props.allAnnotationDataList);
  function handleChangeAnnotationSearch() {
    let filterAnnotationData = props.allAnnotationDataList;
    // if (areatype.value !== 'all') {
    //   filterAnnotationData = filterAnnotationData.filter((item) => item.type == areatype.value);
    // }
    // if (areastate.value !== 'all') {
    //   filterAnnotationData = filterAnnotationData.filter((item) => item.state == areastate.value);
    // }
    filterAfterAnnotationDataList.value = filterAnnotationData;
    showMenuInfoList.value = filterAfterAnnotationDataList.value;
  }
  // 地图标注-删除标注
  function deleteAnnotation(show) {
    show.deleteClickNum = 0;
    emits('deleteAnnotation', show);
  }
  // 地图标注-显示该标注
  function showThisAnnotation(value) {
    setNowShowAnnotationData({
      ...value,
      state: 0,
    });
    UpdateAnnotation({
      ...value,
      properties: JSON.stringify(value.properties),
      state: 0,
    }).then((res) => {
      emits('setAllAnnotationData');
    });
  }
  // 地图标注-隐藏该标注
  function hideThisAnnotation(value) {
    setNowShowAnnotationData({
      ...value,
      state: 1,
    });
    UpdateAnnotation({
      ...value,
      properties: JSON.stringify(value.properties),
      state: 1,
    }).then((res) => {
      emits('setAllAnnotationData');
    });
  }

  // 地图作业区域-------------------------------------------------
  // 地图作业区域-单选
  const areatype = ref('all');
  const areastate = ref('all');
  // 地图作业区域-获取类别区分
  function getType(type) {
    let name = '';
    switch (type) {
      case 'nfz':
        name = '自定义限飞区';
        break;
      case 'dfence':
        name = '自定义作业区';
        break;
      case 'noland':
        name = '自定义禁降区';
        break;
    }
    return name;
  }
  // 地图作业区域-下拉框
  const filterAfterAreaDataList = ref(props.allAreaDataList);
  function handleChangeAreaSelect() {
    let filterAreaData = props.allAreaDataList;
    if (areatype.value !== 'all') {
      filterAreaData = filterAreaData.filter((item) => item.type == areatype.value);
    }
    if (areastate.value !== 'all') {
      filterAreaData = filterAreaData.filter((item) => item.state == areastate.value);
    }
    filterAfterAreaDataList.value = filterAreaData;
    showMenuInfoList.value = filterAfterAreaDataList.value;
  }

  // 地图作业区域-启用该区域
  function enableThisArea(value) {
    setNowShowAreaData({
      ...value,
      state: 0,
    });
    UpdateWorkArea({
      ...value,
      properties: JSON.stringify(value.properties),
      state: 0,
    }).then((res) => {
      emits('setAllAreaData');
    });
  }
  // 地图作业区域-禁用该区域
  function disableThisArea(value) {
    setNowShowAreaData({
      ...value,
      state: 1,
    });
    UpdateWorkArea({
      ...value,
      properties: JSON.stringify(value.properties),
      state: 1,
    }).then((res) => {
      emits('setAllAreaData');
    });
  }
  // 地图作业区域-删除此区域
  function deleteArea(show) {
    emits('deleteArea', show);
  }

  // 设定当前标记
  function setNowShowAnnotationData(value) {
    emits('setNowShowAnnotationData', value);
  }
  // 设定当前图片
  function setNowShowImageData(value) {
    emits('setNowShowImageData', value);
  }
  // 设定当前区域
  function setNowShowAreaData(value) {
    emits('setNowShowAreaData', value);
  }

  // ------------------------------------------------------------------
  // 移动到中心位置
  function handlerLocation(position) {
    // if (showMenuInfoName.value == '地图标注') {
    //   let coordinates = position.coordinates;
    //   switch (position.type) {
    //     case 0:
    //       emits('handlerLocation', {
    //         lng: coordinates[0],
    //         lat: coordinates[1],
    //       });
    //       break;
    //     case 1:
    //       emits('handlerLocation', {
    //         lng: coordinates[0][0],
    //         lat: coordinates[0][1],
    //       });
    //       break;
    //     case 2:
    //       emits('handlerLocation', {
    //         lng: coordinates[0][0][0],
    //         lat: coordinates[0][0][1],
    //       });
    //       break;
    //     case 3:
    //       emits('handlerLocation', {
    //         lng: coordinates[0],
    //         lat: coordinates[1],
    //       });
    //       break;
    //   }
    // }
    // if (showMenuInfoName.value == '地图照片') {
    //   emits('handlerLocation', {
    //     lng: position.photo_position.lng,
    //     lat: position.photo_position.lat,
    //   });
    // }
    if (showMenuInfoName.value == '地图作业区域') {
      if (position.geomtype == 'Circle') {
        emits('handlerLocation', {
          lng: position.properties.centerPoint[0],
          lat: position.properties.centerPoint[1],
        });
      } else {
        emits('handlerLocation', {
          lng: position.properties.centerPoint[0],
          lat: position.properties.centerPoint[1],
        });
      }
    }
  }

  defineExpose({
    updateShowMenuInfoList,
  });
</script>
<style lang="less" scoped>
  .leftMenu {
    position: relative;
    width: 100%;
    height: 100%;
    background: #232323;

    .leftMenuTitle {
      position: relative;
      width: 100%;
      height: 50px;
      padding: 10px;
      border-bottom: 1px solid #ffffff55;
      .title {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: 20px;
        color: #ffffff;
        width: 100%;

        /* 关键属性 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }

    .leftMenuContent {
      position: relative;
      display: flex;
      width: 100%;
      height: calc(100%-50px);
      // height: 800px;

      .leftMenuContent_1 {
        position: relative;
        width: 64px;
        height: 100%;
        border-right: 1px solid #ffffff55;
        // padding-top: 10px;
        // padding-bottom: 10px;

        .leftMenu_closeButton {
          position: relative;
          padding-top: 7px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 10px;
        }

        .leftMenu_buttonList {
          position: relative;
          width: 50px;
          height: 100%;
          border-radius: 10px;
          background: #1a375a;
          margin-top: 15px;
          margin-left: 7px;
          margin-right: 7px;
          padding-top: 5px;
          padding-bottom: 5px;
          gap: 10px;

          .leftMenu_buttonList_annotation {
            position: relative;
            border-radius: 5px;
            height: 40px;
            width: 40px;
            margin: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
          }
          .leftMenu_buttonList_image {
            position: relative;
            border-radius: 5px;
            height: 40px;
            width: 40px;
            margin: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
          }
          .leftMenu_buttonList_area {
            position: relative;
            border-radius: 5px;
            height: 40px;
            width: 40px;
            margin: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
          }
        }
      }

      .leftMenuContent_2 {
        position: relative;
        width: 275px;
        height: 100%;

        .leftMenuContent_title {
          margin-top: 10px;
          margin-left: 10px;
          color: #ffffff;
          font-size: 16px;
        }

        .leftMenuContent_list {
          overflow-y: auto;
          max-height: 800px;

          // 地图标注
          .showMenuInfo_annotation {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            color: #ffffff;
            height: 30px;
            padding-left: 15px;
            gap: 10px;

            .eye {
              display: flex;
              align-items: center;
              justify-content: center;
              width: 20px;
              height: 20px;
            }
            .buttonRight2 {
              position: absolute;
              right: 30px;
              width: 20px;
              height: 20px;
              display: flex;
              align-items: center;
              justify-content: center;
            }
            .buttonRight1 {
              position: absolute;
              right: 5px;
              width: 20px;
              height: 20px;
              display: flex;
              align-items: center;
              justify-content: center;
            }
          }
          // 地图照片
          .showMenuInfo_image {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            color: #ffffff;
            height: 30px;
            padding-left: 15px;
            gap: 10px;

            .eye {
              display: flex;
              align-items: center;
              justify-content: center;
              width: 20px;
              height: 20px;
            }
            .buttonRight2 {
              position: absolute;
              right: 35px;
            }
            .buttonRight1 {
              position: absolute;
              right: 10px;
            }
          }
          // 地图作业区域
          .showMenuInfo_area {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            height: 70px;
            margin: 10px 15px;

            .name {
              position: absolute;
              top: 6px;
              left: 6px;
              color: #ffffff;
              font-size: 15px;
              width: 90%;
              height: 30px;

              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
            }
            .type {
              position: absolute;
              display: inline-flex;
              align-items: center;
              justify-content: flex-start;
              bottom: 6px;
              left: 8px;
              color: #ffffff;
              font-size: 15px;
              width: 165px;
            }
            .buttonlist {
              position: absolute;
              bottom: 6px;
              right: 6px;
              width: 75px;
              height: 25px;
              display: flex;
              gap: 1px;

              .button {
                display: flex;
                align-items: center;
                justify-content: center;
                color: #ffffff;
                font-size: 16px;
                width: 25px;
                height: 25px;
              }
            }
          }
        }
      }
    }
  }

  .suojinButton {
    position: absolute;
    top: 45%;
    right: -18px;
    height: 90px;
    width: 18px;
    background: #ffffff;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
  }
</style>
