"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
require("../../../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.js");
const utils = require("../../../../../../../utils/utils.js");
require("../../../../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.js");
const router = require("../../../../../../../utils/router.js");
require("../../../../../../../store/modules/designStore/designStore.js");
require("../../../../../../../settings/designSetting.js");
require("../../../../../../../components/GoLoading/index.js");
require("../../../../../../../components/GoSkeleton/index.vue.js");
const icon = require("../../../../../../../plugins/icon.js");
const pageEnum = require("../../../../../../../enums/pageEnum.js");
const runtimeCore_esmBundler = require("../../../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
const reactivity_esmBundler = require("../../../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    show: Boolean
  },
  emits: ["close"],
  setup(__props, { emit }) {
    const props = __props;
    const { FishIcon, CloseIcon } = icon.icon.ionicons5;
    const { StoreIcon, ObjectStorageIcon } = icon.icon.carbon;
    const showRef = reactivity_esmBundler.ref(false);
    const typeList = reactivity_esmBundler.shallowRef([
      {
        title: "新项目",
        key: pageEnum.ChartEnum.CHART_HOME_NAME,
        icon: FishIcon,
        disabled: false
      },
      {
        title: "我的模板",
        key: pageEnum.PageEnum.BASE_HOME_TEMPLATE_NAME,
        icon: ObjectStorageIcon,
        disabled: true
      },
      {
        title: "模板市场",
        key: pageEnum.PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
        icon: StoreIcon,
        disabled: true
      }
    ]);
    runtimeCore_esmBundler.watch(props, (newValue) => {
      showRef.value = newValue.show;
    });
    const closeHandle = () => {
      emit("close", false);
    };
    const btnHandle = (key) => {
      closeHandle();
      const id = utils.getUUID();
      const path = router.fetchPathByName(pageEnum.ChartEnum.CHART_HOME_NAME, "href");
      router.routerTurnByPath(path, [id], void 0, true);
    };
    return (_ctx, _cache) => {
      const _component_n_text = runtimeCore_esmBundler.resolveComponent("n-text");
      const _component_n_icon = runtimeCore_esmBundler.resolveComponent("n-icon");
      const _component_n_button = runtimeCore_esmBundler.resolveComponent("n-button");
      const _component_n_space = runtimeCore_esmBundler.resolveComponent("n-space");
      const _component_n_card = runtimeCore_esmBundler.resolveComponent("n-card");
      const _component_n_modal = runtimeCore_esmBundler.resolveComponent("n-modal");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_modal, {
        show: showRef.value,
        "onUpdate:show": _cache[0] || (_cache[0] = ($event) => showRef.value = $event),
        class: "go-create-modal",
        onAfterLeave: closeHandle
      }, {
        default: runtimeCore_esmBundler.withCtx(() => [
          runtimeCore_esmBundler.createVNode(_component_n_space, { size: "large" }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_card, {
                class: "card-box",
                hoverable: ""
              }, {
                header: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_text, { class: "card-box-tite" }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createTextVNode(" project.create_tip")
                    ]),
                    _: 1
                  })
                ]),
                "header-extra": runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_text, { onClick: closeHandle }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(_component_n_icon, { size: "20" }, {
                        default: runtimeCore_esmBundler.withCtx(() => [
                          (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(runtimeCore_esmBundler.resolveDynamicComponent(reactivity_esmBundler.unref(CloseIcon))))
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })
                ]),
                action: runtimeCore_esmBundler.withCtx(() => []),
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_space, {
                    class: "card-box-content",
                    justify: "center"
                  }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      (runtimeCore_esmBundler.openBlock(true), runtimeCore_esmBundler.createElementBlock(runtimeCore_esmBundler.Fragment, null, runtimeCore_esmBundler.renderList(typeList.value, (item) => {
                        return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_button, {
                          size: "large",
                          disabled: item.disabled,
                          key: item.key,
                          onClick: btnHandle
                        }, {
                          icon: runtimeCore_esmBundler.withCtx(() => [
                            runtimeCore_esmBundler.createVNode(_component_n_icon, { size: "18" }, {
                              default: runtimeCore_esmBundler.withCtx(() => [
                                (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(runtimeCore_esmBundler.resolveDynamicComponent(item.icon)))
                              ]),
                              _: 2
                            }, 1024)
                          ]),
                          default: runtimeCore_esmBundler.withCtx(() => [
                            (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(runtimeCore_esmBundler.resolveDynamicComponent(item.title)))
                          ]),
                          _: 2
                        }, 1032, ["disabled"]);
                      }), 128))
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["show"]);
    };
  }
});
exports.default = _sfc_main;
