<template>
  <el-scrollbar style="height: 100%;" class="bg-white">
    <div v-if="form" class="app-info bg-white px-5 py-5 flex justify-around items-center">
      <div class="item text-center flex flex-col items-center">
        <div class="text-gray-400">租户ID</div>
        <el-icon class="py-1" size="24">
          <Cpu/>
        </el-icon>
        <span class="text-gray-500">{{ form.tenantId }}</span>
      </div>
      <el-divider class="opacity-40" style="height: 40px" direction="vertical"/>
      <div class="item text-center flex flex-col items-center">
        <div class="text-gray-400">插件类型</div>
        <el-icon size="24" class="py-1">
          <Monitor/>
        </el-icon>
        <span class="text-gray-500">{{ form.industryParent || '网站' }}</span>
      </div>
      <el-divider class="opacity-40" style="height: 40px" direction="vertical"/>
      <div class="item text-center flex flex-col items-center">
        <div class="text-gray-400">访问域名</div>
        <div>
          <svg t="1739721752315" class="icon pt-2" viewBox="0 0 1024 1024" version="1.1"
               xmlns="http://www.w3.org/2000/svg" p-id="11933" width="22" height="22">
            <path
              d="M319.9 428.9h37.7l-66.1 216.7H259c-28.9-98-43.9-149.1-44.9-154.3-2.1-4.6-3.1-12.4-3.1-23.2h-1c0 4.6-1 12.4-3.1 23.2-2.1 4.6-18.1 56.2-48 154.3h-32.5l-63-216.7h37.7c23.7 91.3 36.6 141.4 38.7 149.6 0 0.5 0.5 1.5 1 3.1 1.5 9.8 2.1 17 2.1 21.2h1c0-7.7 1.5-15.5 4.1-24.3 2.1-5.7 17-55.7 44.9-149.6h35.6c25.8 94.4 39.7 144.5 41.8 149.6 2.6 8.3 4.1 16.5 4.1 24.3h1c0-4.1 0.5-11.4 2.1-21.2 0.5-1.5 1-2.6 1-3.1 2.7-8.2 16.1-58.2 41.4-149.6z m300.8 0h37.7l-66.1 216.7h-32.5c-28.9-98-43.9-149.1-44.9-154.3-2.1-4.6-3.1-12.4-3.1-23.2h-1c0 4.6-1 12.4-3.1 23.2-2.1 4.6-18.1 56.2-48 154.3h-32.5l-63-216.7h37.7c23.7 91.3 36.6 141.4 38.7 149.6 0 0.5 0.5 1.5 1 3.1 1.5 9.8 2.1 17 2.1 21.2h0.5c0-7.7 1.5-15.5 4.1-24.3 2.1-5.7 17-55.7 44.9-149.6h35.6c25.8 94.4 39.7 144.5 41.8 149.6 2.6 8.3 4.1 16.5 4.1 24.3h1c0-4.1 0.5-11.4 2.1-21.2 0.5-1.5 1-2.6 1-3.1 3.2-8.2 16.6-58.2 41.9-149.6z m300.9 0h37.7l-66.1 216.7h-32.5c-28.9-98-43.9-149.1-44.9-154.3-2.1-4.6-3.1-12.4-3.1-23.2h-1c0 4.6-1 12.4-3.1 23.2-2.1 4.6-18.1 56.2-48 154.3h-32.5l-63-216.7h37.7c23.7 91.3 36.6 141.4 38.7 149.6 0 0.5 0.5 1.5 1 3.1 1.5 9.8 2.1 17 2.1 21.2h1c0-7.7 1.5-15.5 4.1-24.3 2.1-5.7 17-55.7 44.9-149.6h35.6C856 523.4 870 573.4 872 578.6c2.6 8.3 4.1 16.5 4.1 24.3h1c0-4.1 0.5-11.4 2.1-21.2 0.5-1.5 1-2.6 1-3.1 2.7-8.3 16.1-58.3 41.4-149.7z m-755.5-39.2C222.9 254 357 158.5 513.4 158.5S803.9 254 860.7 389.7h45.9c-58.8-160-212.6-274-393.2-274s-333.9 114-393.2 274h45.9z m691 299.3c-58.8 131.1-190.4 222.9-343.7 222.9-153.3 0-284.8-91.3-343.7-222.9h-46.4c61.4 155.3 212.6 265.2 390.1 265.2 177 0 328.7-109.9 390.1-265.2h-46.4z"
              fill="" p-id="11934"></path>
            <path d="M513.4 217.8c-123.2 0-230.1 69.7-283.4 171.9h-14.9c54.4-109.8 167.6-185.2 298.4-185.2" fill=""
                  p-id="11935"></path>
          </svg>
        </div>
        <nuxt-link :to="`https://${form.adminUrl}`"  class="text-gray-500">{{ form.adminUrl }}</nuxt-link>
      </div>
      <el-divider class="opacity-40" style="height: 40px" direction="vertical"/>
      <nuxt-link :to="`/market/user/${form.userId}`" class="item text-center flex flex-col items-center">
        <div class="text-gray-400">开发者</div>
        <el-icon size="24" class="py-1">
          <Avatar/>
        </el-icon>
        <span class="text-gray-500">{{ form.developer || '匿名' }}</span>
      </nuxt-link>
      <el-divider class="opacity-40" style="height: 40px" direction="vertical"/>
      <nuxt-link :to="`https://git.websoft.top`" class="item text-center">
        <div class="text-gray-400">源代码</div>
        <div class="text-2xl font-bold">
          <svg t="1739720696276" class="icon pt-2" viewBox="0 0 1024 1024" version="1.1"
               xmlns="http://www.w3.org/2000/svg" p-id="4176" width="22" height="22">
            <path
              d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9 23.5 23.2 38.1 55.4 38.1 91v112.5c0.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"
              p-id="4177"></path>
          </svg>
        </div>
        <span class="text-gray-500">下载</span>
      </nuxt-link>
      <el-divider class="opacity-40" style="height: 40px" direction="vertical"/>
      <div class="item text-center flex flex-col items-center">
        <div class="rate text-gray-400">评分</div>
        <div class="text-2xl font-bold">3.5</div>
        <el-rate v-model="form.rate" disabled size="small"/>
      </div>
      <!--    <el-divider class="opacity-40" style="height: 40px" direction="vertical" />-->
      <!--    <div class="item text-center flex flex-col items-center">-->
      <!--      <div class="text-gray-400">下载次数</div>-->
      <!--      <el-icon size="24" class="py-1"><Download /></el-icon>-->
      <!--      <span class="text-gray-500">{{ form.downloads }}</span>-->
      <!--    </div>-->
    </div>
  </el-scrollbar>
</template>

<script setup lang="ts">
import {ArrowLeft, View, Menu, Search, Compass, Cpu, Monitor, Download, Platform, Avatar} from '@element-plus/icons-vue'
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
import {getUser, listUsers} from "~/api/system/user";

const i18n = useI18n();

const props = withDefaults(
  defineProps<{
    title?: string;
    desc?: string;
    buyUrl?: string;
    form?: CmsWebsite;
    value?: number;
  }>(),
  {}
);

const emit = defineEmits<{
  (e: 'done', where: any): void
}>()

// 搜索表单
const where = reactive<any>({
  keywords: '',
  page: 1,
  limit: 20,
  status: 0,
  parentId: undefined,
  categoryId: undefined,
  lang: i18n.locale.value
});

</script>
<style lang="less">
.app-info{
  .item {
    min-width: 100px;
    white-space: nowrap; /* 防止内容换行 */
    text-align: center;
  }
}
</style>

