@file:Suppress("UNCHECKED_CAST", "USELESS_CAST", "INAPPLICABLE_JVM_NAME", "UNUSED_ANONYMOUS_PARAMETER", "SENSELESS_COMPARISON", "NAME_SHADOWING", "UNNECESSARY_NOT_NULL_ASSERTION")
package uni.UNIHelloUniAppX
import io.dcloud.uniapp.*
import io.dcloud.uniapp.extapi.*
import io.dcloud.uniapp.framework.*
import io.dcloud.uniapp.runtime.*
import io.dcloud.uniapp.vue.*
import io.dcloud.uniapp.vue.shared.*
import io.dcloud.unicloud.*
import io.dcloud.uts.*
import io.dcloud.uts.Map
import io.dcloud.uts.Set
import io.dcloud.uts.UTSAndroid
import kotlin.properties.Delegates
import io.dcloud.uniapp.extapi.setNavigationBarTitle as uni_setNavigationBarTitle
import io.dcloud.uniapp.extapi.showToast as uni_showToast
open class GenPagesUniUiTabBarTabBarMidbutton : BasePage {
    constructor(__ins: ComponentInternalInstance, __renderer: String?) : super(__ins, __renderer) {
        onLoad(fun(_: OnLoadOptions) {
            stat_instance.onLoad(this)
        }
        , __ins)
        onPageShow(fun() {
            stat_instance.onShow(this)
        }
        , __ins)
        onPageHide(fun() {
            stat_instance.onHide(this)
        }
        , __ins)
        onUnload(fun() {
            stat_instance.onUnload(this)
        }
        , __ins)
    }
    companion object {
        @Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
        var setup: (__props: GenPagesUniUiTabBarTabBarMidbutton) -> Any? = fun(__props): Any? {
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenPagesUniUiTabBarTabBarMidbutton
            val _cache = __ins.renderCache
            val activeIndex = ref<Number>(0)
            val midButtonClickCount = ref<Number>(0)
            var tabContentHeightFull = false
            fun gen_handleChange_fn(index: Number): Unit {
                activeIndex.value = index
                when (index) {
                    0 -> 
                        uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "组件"))
                    1 -> 
                        uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "API"))
                    2 -> 
                        uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "CSS"))
                    3 -> 
                        uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "模板"))
                }
            }
            val handleChange = ::gen_handleChange_fn
            fun gen_handleMidButtonClick_fn(): Unit {
                midButtonClickCount.value = midButtonClickCount.value + 1
                uni_showToast(ShowToastOptions(title = "mid-button 点击 " + midButtonClickCount.value + " 次", icon = "none"))
            }
            val handleMidButtonClick = ::gen_handleMidButtonClick_fn
            return fun(): Any? {
                val _component_uni_tab_content = resolveEasyComponent("uni-tab-content", GenUniModulesUniTabBarComponentsUniTabContentUniTabContentClass)
                val _component_uni_tab_item = resolveEasyComponent("uni-tab-item", GenUniModulesUniTabBarComponentsUniTabItemUniTabItemClass)
                val _component_uni_tab_midbutton = resolveEasyComponent("uni-tab-midbutton", GenUniModulesUniTabBarComponentsUniTabMidbuttonUniTabMidbuttonClass)
                val _component_uni_tab_bar = resolveEasyComponent("uni-tab-bar", GenUniModulesUniTabBarComponentsUniTabBarUniTabBarClass)
                val _component_uni_tab = resolveEasyComponent("uni-tab", GenUniModulesUniTabBarComponentsUniTabUniTabClass)
                return _cV(_component_uni_tab, _uM("style" to _nS(_uM("flex" to "1")), "active-index" to unref(activeIndex), "tab-content-height-full" to unref(tabContentHeightFull), "onChange" to handleChange), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                    return _uA(
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent1Class))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent2Class))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent3Class))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent4Class))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_bar, _uM("style" to _nS(_uM("border-top" to "0px"))), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(_component_uni_tab_item, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("image", _uM("src" to if (unref(activeIndex) == 0) {
                                            "/static/componentHL.png"
                                        } else {
                                            "/static/component.png"
                                        }
                                        , "class" to "tab-icon-image"), null, 8, _uA(
                                            "src"
                                        )),
                                        _cE("text", _uM("class" to _nC(_uA(
                                            "tab-label",
                                            if (unref(activeIndex) == 0) {
                                                "tab-label-active"
                                            } else {
                                                ""
                                            }
                                        ))), "组件", 2)
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_tab_item, _uM("badge-text" to "99+"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("image", _uM("src" to if (unref(activeIndex) == 1) {
                                            "/static/apiHL.png"
                                        } else {
                                            "/static/api.png"
                                        }
                                        , "class" to "tab-icon-image"), null, 8, _uA(
                                            "src"
                                        )),
                                        _cE("text", _uM("class" to _nC(_uA(
                                            "tab-label",
                                            if (unref(activeIndex) == 1) {
                                                "tab-label-active"
                                            } else {
                                                ""
                                            }
                                        ))), "API", 2)
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_tab_midbutton, _uM("width" to 60, "height" to 60), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "mid-button-shell"), _uA(
                                            _cE("view", _uM("class" to "mid-button-core", "hover-class" to "mid-button-core-hover", "hover-stop-propagation" to true, "onClick" to handleMidButtonClick), _uA(
                                                _cE("text", _uM("class" to "mid-button-plus"), "+"),
                                                _cE("text", _uM("class" to "mid-button-label"), "发布")
                                            ))
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_tab_item, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("image", _uM("src" to if (unref(activeIndex) == 2) {
                                            "/static/cssHL.png"
                                        } else {
                                            "/static/css.png"
                                        }
                                        , "class" to "tab-icon-image"), null, 8, _uA(
                                            "src"
                                        )),
                                        _cE("text", _uM("class" to _nC(_uA(
                                            "tab-label",
                                            if (unref(activeIndex) == 2) {
                                                "tab-label-active"
                                            } else {
                                                ""
                                            }
                                        ))), "CSS", 2)
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_tab_item, _uM("badge-text" to ""), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("image", _uM("src" to if (unref(activeIndex) == 3) {
                                            "/static/templateHL.png"
                                        } else {
                                            "/static/template.png"
                                        }
                                        , "class" to "tab-icon-image"), null, 8, _uA(
                                            "src"
                                        )),
                                        _cE("text", _uM("class" to _nC(_uA(
                                            "tab-label",
                                            if (unref(activeIndex) == 3) {
                                                "tab-label-active"
                                            } else {
                                                ""
                                            }
                                        ))), "模板", 2)
                                    )
                                }
                                ), "_" to 1))
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "style"
                        ))
                    )
                }
                ), "_" to 1), 8, _uA(
                    "style",
                    "active-index",
                    "tab-content-height-full"
                ))
            }
        }
        val styles: Map<String, Map<String, Map<String, Any>>> by lazy {
            _nCS(_uA(
                styles0
            ))
        }
        val styles0: Map<String, Map<String, Map<String, Any>>>
            get() {
                return _uM("tab-icon-image" to _pS(_uM("width" to 24, "height" to 24)), "tab-label" to _pS(_uM("fontSize" to 10, "color" to "rgb(122,126,131)")), "tab-label-active" to _pS(_uM("color" to "#007aff")), "mid-button-shell" to _pS(_uM("display" to "flex", "flexDirection" to "column", "justifyContent" to "center", "alignItems" to "center", "backgroundColor" to "rgba(0,0,0,0)")), "mid-button-core" to _pS(_uM("width" to 52, "height" to 52, "borderTopLeftRadius" to 26, "borderTopRightRadius" to 26, "borderBottomRightRadius" to 26, "borderBottomLeftRadius" to 26, "backgroundColor" to "#ff7a18", "display" to "flex", "flexDirection" to "column", "justifyContent" to "center", "alignItems" to "center")), "mid-button-core-hover" to _pS(_uM("transform" to "scale(0.96)", "opacity" to 0.92)), "mid-button-plus" to _pS(_uM("fontSize" to 22, "lineHeight" to "22px", "color" to "#ffffff")), "mid-button-label" to _pS(_uM("marginTop" to 1, "fontSize" to 9, "color" to "#ffffff")))
            }
        var inheritAttrs = true
        var inject: Map<String, Map<String, Any?>> = _uM()
        var emits: Map<String, Any?> = _uM()
        var props = _nP(_uM())
        var propsNeedCastKeys: UTSArray<String> = _uA()
        var components: Map<String, CreateVueComponent> = _uM()
    }
}
