/**
 * Copyright (c) 2023 - present TinyEngine Authors.
 * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
 *
 * Use of this source code is governed by an MIT-style license.
 *
 * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
 * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
 * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
 *
 */

;(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined'
    ? (module.exports = factory(
        require('@opentiny/tiny-engine-webcomponent-core'),
        require('vue'),
        require('vue-i18n'),
        require('@opentiny/vue')
      ))
    : typeof define === 'function' && define.amd
    ? define(['@opentiny/tiny-engine-webcomponent-core', 'vue', 'vue-i18n', '@opentiny/vue'], factory)
    : ((global = typeof globalThis !== 'undefined' ? globalThis : global || self),
      (global.TinyVueBlock = factory(global.TinyWebcomponentCore, global.Vue, global.VueI18n, global.TinyVue)))
})(this, function (tinyWebcomponentCore, vue, vueI18n, tinyVue3) {
  'use strict'
  function _interopNamespace(e) {
    if (e && e.__esModule) return e
    var n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } })
    if (e) {
      Object.keys(e).forEach(function (k) {
        if (k !== 'default') {
          var d = Object.getOwnPropertyDescriptor(e, k)
          Object.defineProperty(
            n,
            k,
            d.get
              ? d
              : {
                  enumerable: true,
                  get: function () {
                    return e[k]
                  }
                }
          )
        }
      })
    }
    n['default'] = e
    return Object.freeze(n)
  }
  var vue__namespace = /* @__PURE__ */ _interopNamespace(vue)
  Object.freeze({})
  Object.freeze([])
  const cacheStringFunction = (fn) => {
    const cache = /* @__PURE__ */ Object.create(null)
    return (str) => {
      const hit = cache[str]
      return hit || (cache[str] = fn(str))
    }
  }
  const hyphenateRE = /\B([A-Z])/g
  const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase())
  var _style_0 =
    '\n.home-content[data-v-5d023d19] {\r\n  display: flex;\r\n  flex-direction: column;\r\n  justify-content: center;\r\n  align-items: center;\r\n  text-align: center;\r\n  height: calc(100vh - 262px);\n}\n.home-content .btn[data-v-5d023d19] {\r\n    margin-top: 24px;\n}\n.home-content .btn button[data-v-5d023d19] {\r\n      border: none;\r\n      border-radius: 30px;\r\n      background: #5e7ce0;\r\n     \r\n      font-size: 14px;\r\n      color: #fff;\r\n      \r\n      cursor: pointer;\n}\n.home-content .text[data-v-5d023d19] {\r\n    font-size: 18px;\n}\n.home-content .account[data-v-5d023d19] {\r\n    margin-top: 16px;\n}\n.home-content .account .sub-text[data-v-5d023d19] {\r\n      color: #575d6c;\n}\n.home-content .account .login[data-v-5d023d19] {\r\n      color: #1890ff;\r\n      cursor: pointer;\n}\n.home-content .logo img[data-v-5d023d19]{\r\n      border-radius: 50%;\r\n      overflow: hidden;\n}\n'
  var _export_sfc = (sfc, props) => {
    const target = sfc.__vccOpts || sfc
    for (const [key, val] of props) {
      target[key] = val
    }
    return target
  }
  const _sfc_main = {
    components: {
      TinyButton: tinyVue3.Button,
      TinyCol: tinyVue3.Col,
      TinyRow: tinyVue3.Row
    },
    props: {},
    emits: ['goto-home'],
    setup(props, context) {
      const { t, lowcodeWrap } = vue__namespace.inject(vueI18n.I18nInjectionKey).lowcode()
      const wrap = lowcodeWrap(props, context, t)
      const state = vue__namespace.reactive({
        logoUrl:
          'data:image/png;base64,[encoded data, 17328 characters]',
        loginImgUrl:
          'data:image/png;base64,[encoded data, 125200 characters]'
      })
      const handleClick = wrap(function (event) {
        this.emit('goto-home', event)
      })
      const attrs = wrap({
        state,
        handleClick
      })
      return attrs
    }
  }
  const _withScopeId = (n) => (vue.pushScopeId('data-v-5d023d19'), (n = n()), vue.popScopeId(), n)
  const _hoisted_1 = {
    class: 'home',
    style: { height: '100vh', display: 'flex' }
  }
  const _hoisted_2 = { style: { width: '90%', height: '50%' } }
  const _hoisted_3 = ['src']
  const _hoisted_4 = {
    class: 'home-content',
    style: { 'font-size': '14px' }
  }
  const _hoisted_5 = { class: 'text' }
  const _hoisted_6 = { style: { 'font-size': '16px' } }
  const _hoisted_7 = { class: 'logo' }
  const _hoisted_8 = ['src']
  const _hoisted_9 = {
    style: {
      display: 'block',
      'font-size': '28px',
      'margin-top': '12px',
      'margin-bottom': '12px',
      'font-weight': 'bold'
    },
    ref: '',
    class: 'title'
  }
  const _hoisted_10 = /* @__PURE__ */ _withScopeId(() =>
    /* @__PURE__ */ vue.createElementVNode(
      'span',
      { style: { display: 'block', 'margin-bottom': '12px' } },
      '\u81F4\u529B\u4E8E\u901A\u8FC7\u53CB\u597D\u7684\u7528\u6237\u4EA4\u4E92\u63D0\u5347\u4E1A\u52A1\u7684\u5F00\u53D1\u6548\u7387',
      -1
    )
  )
  const _hoisted_11 = /* @__PURE__ */ _withScopeId(() =>
    /* @__PURE__ */ vue.createElementVNode(
      'span',
      { style: { 'margin-top': '12px' } },
      '\u6B22\u8FCE\u4E00\u8D77\u6765\u89E3\u9501~~',
      -1
    )
  )
  const _hoisted_12 = { class: 'btn' }
  const _hoisted_13 = { class: 'account' }
  const _hoisted_14 = { style: { 'font-size': '14px', 'margin-top': '4px' } }
  const _hoisted_15 = /* @__PURE__ */ _withScopeId(() =>
    /* @__PURE__ */ vue.createElementVNode(
      'span',
      { style: { color: '#777777' } },
      '\u5DF2\u6709\u56E2\u961F\uFF1F',
      -1
    )
  )
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_tiny_col = vue.resolveComponent('tiny-col')
    const _component_tiny_button = vue.resolveComponent('tiny-button')
    const _component_tiny_row = vue.resolveComponent('tiny-row')
    return (
      vue.openBlock(),
      vue.createElementBlock('div', null, [
        vue.createElementVNode('div', _hoisted_1, [
          vue.createVNode(
            _component_tiny_row,
            {
              align: 'middle',
              flex: true,
              style: {}
            },
            {
              default: vue.withCtx(() => [
                vue.createVNode(
                  _component_tiny_col,
                  {
                    span: 6,
                    style: { 'text-align': 'center', display: 'flex', 'justify-content': 'center' }
                  },
                  {
                    default: vue.withCtx(() => [
                      vue.createElementVNode('div', _hoisted_2, [
                        vue.createElementVNode(
                          'img',
                          {
                            style: { width: '100%', height: '100%' },
                            src: _ctx.state.loginImgUrl
                          },
                          null,
                          8,
                          _hoisted_3
                        )
                      ])
                    ]),
                    _: 1
                  }
                ),
                vue.createVNode(
                  _component_tiny_col,
                  {
                    span: '6',
                    style: { 'text-align': 'center' }
                  },
                  {
                    default: vue.withCtx(() => [
                      vue.createElementVNode('div', _hoisted_4, [
                        vue.createElementVNode('div', _hoisted_5, [
                          vue.createElementVNode('div', _hoisted_6, [
                            vue.createElementVNode('div', _hoisted_7, [
                              vue.createElementVNode(
                                'img',
                                {
                                  style: { width: '105px', height: '105px', 'border-radius': '100px' },
                                  src: _ctx.state.logoUrl
                                },
                                null,
                                8,
                                _hoisted_8
                              )
                            ]),
                            vue.createElementVNode(
                              'span',
                              _hoisted_9,
                              'TinyLowCode \u4F4E\u4EE3\u7801\u5E73\u53F0',
                              512
                            ),
                            _hoisted_10,
                            _hoisted_11
                          ]),
                          vue.createElementVNode('div', _hoisted_12, [
                            vue.createVNode(_component_tiny_button, {
                              text: '\u7ACB\u5373\u4F53\u9A8C',
                              round: true,
                              type: 'primary',
                              style: { 'margin-top': '40px' }
                            }),
                            vue.createElementVNode('div', _hoisted_13, [
                              vue.createElementVNode('div', _hoisted_14, [
                                _hoisted_15,
                                vue.createElementVNode(
                                  'span',
                                  {
                                    style: { color: '#5e7ce0' },
                                    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleClick(_ctx.event))
                                  },
                                  '\u7ACB\u5373\u8FDB\u5165'
                                )
                              ])
                            ])
                          ])
                        ])
                      ])
                    ]),
                    _: 1
                  }
                )
              ]),
              _: 1
            }
          )
        ])
      ])
    )
  }
  var block = /* @__PURE__ */ _export_sfc(_sfc_main, [
    ['render', _sfc_render],
    ['styles', [_style_0]],
    ['__scopeId', 'data-v-5d023d19'],
    ['__file', 'D:/tmp/buildground/buildground_1673597486053/src/block/generated/components/PortalHome.vue']
  ])
  window.TinyLowcodeResource = window.TinyLowcodeResource || {}
  const blockName = hyphenate('PortalHome')
  block.blockId = 989
  block.blockVersion = '1.0.0'
  if (customElements.get(blockName)) {
    if (window.TinyLowcodeResource[blockName]) {
      Object.assign(window.TinyLowcodeResource[blockName], block)
    }
  } else {
    block.links = {
      VUE_APP_UI_LIB_FULL_STYLE_FILE_URL: ['//localhost:9090/assets/css/0.1.20/index.css']
    }.VUE_APP_UI_LIB_FULL_STYLE_FILE_URL
    window.TinyLowcodeResource[blockName] = block
    customElements.define(blockName, tinyWebcomponentCore.defineCustomElement(block))
  }
  return block
})
