<!-- 搜索表单 -->
<template>
  <a-space style="flex-wrap: wrap">
    <a-button
      type="text"
      @click="openUrl('/assets/server')"
    >服务器列表
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/ssl')"
    >SSL证书
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/domain')"
    >域名管理
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/sql')"
    >云数据库
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/vhost')"
    >网站空间
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/email')"
    >企业邮箱
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/softwareCert')"
    >软件著作权
    </a-button>

    <a-button
      type="text"
      @click="openUrl('/assets/code')"
    >源码列表
    </a-button>
    <a-button
      type="text"
      @click="openUrl('/assets/api-server')"
    >服务列表
    </a-button>
  </a-space>
</template>

<script lang="ts" setup>
import {watch,nextTick} from 'vue';
import {CmsWebsite} from '@/api/cms/cmsWebsite/model';
import {openUrl} from "@/utils/common";
import {message} from 'ant-design-vue';
import {removeSiteInfoCache} from "@/api/cms/cmsWebsite";

const props = withDefaults(
  defineProps<{
    // 选中的角色
    selection?: [];
    website?: CmsWebsite;
    count?: 0;
  }>(),
  {}
);

const emit = defineEmits<{
  (e: 'add'): void;
}>();

const add = () => {
  emit('add');
};

// 清除缓存
const clearSiteInfoCache = () => {
  removeSiteInfoCache('SiteInfo:' + localStorage.getItem('TenantId') + "*").then(
    (msg) => {
      if (msg) {
        message.success(msg);
      }
    }
  );
};

nextTick(() => {
  if(localStorage.getItem('NotActive')){
    // IsActive.value = false
  }
})

watch(
  () => props.selection,
  () => {
  }
);
</script>
