@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.`$off` as uni__off
import io.dcloud.uniapp.extapi.`$on` as uni__on
import io.dcloud.uniapp.extapi.setNavigationBarTitle as uni_setNavigationBarTitle
open class GenPagesUniUiTabBarTabBarDark : 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: GenPagesUniUiTabBarTabBarDark) -> Any? = fun(__props): Any? {
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenPagesUniUiTabBarTabBarDark
            val _cache = __ins.renderCache
            val TAB_CONTENT1_SCROLL_EVENT = "uni-tab-bar-tab-content1-scroll"
            val TAB_CONTENT1_SWITCH_OFFSET: Number = 100
            val tabContent1Ref = ref<ComponentPublicInstance?>(null)
            var tabContentHeightFull = false
            val activeIndex = ref<Number>(0)
            val showBackToTop = ref<Boolean>(false)
            var lastTabContent1ScrollTop: Number = 0
            fun gen_handleTabContent1Scroll_fn(scrollTop: Number): Unit {
                lastTabContent1ScrollTop = scrollTop
                if (activeIndex.value == 0) {
                    showBackToTop.value = scrollTop > TAB_CONTENT1_SWITCH_OFFSET
                }
            }
            val handleTabContent1Scroll = ::gen_handleTabContent1Scroll_fn
            fun gen_handleFirstTabClick_fn(): Unit {
                if (activeIndex.value == 0 && showBackToTop.value) {
                    val tabContent1Instance = tabContent1Ref.value
                    if (tabContent1Instance != null) {
                        tabContent1Instance.`$callMethod`("scrollToTop")
                    }
                }
            }
            val handleFirstTabClick = ::gen_handleFirstTabClick_fn
            fun gen_handleChange_fn(index: Number): Unit {
                activeIndex.value = index
                if (index == 0) {
                    showBackToTop.value = lastTabContent1ScrollTop > TAB_CONTENT1_SWITCH_OFFSET
                } else {
                    showBackToTop.value = false
                }
                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
            onLoad(fun(_options){
                uni__on(TAB_CONTENT1_SCROLL_EVENT, handleTabContent1Scroll)
            }
            )
            onUnload(fun(){
                uni__off(TAB_CONTENT1_SCROLL_EVENT, handleTabContent1Scroll)
            }
            )
            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_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), _uM("ref_key" to "tabContent1Ref", "ref" to tabContent1Ref, "class" to "dark-tab-content dark-tab-content-home"), null, 512)
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent2Class), _uM("class" to "dark-tab-content dark-tab-content-api"))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent3Class), _uM("class" to "dark-tab-content dark-tab-content-css"))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(unref(GenPagesUniUiTabBarTabContent4Class), _uM("class" to "dark-tab-content dark-tab-content-template"))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_bar, _uM("class" to "dark-tab-list"), _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("view", _uM("class" to "first-tab-button", "onClick" to handleFirstTabClick), _uA(
                                            _cE("view", _uM("class" to "first-tab-animator"), _uA(
                                                _cE("view", _uM("class" to _nC(_uA(
                                                    "first-tab-face",
                                                    if (unref(showBackToTop)) {
                                                        "first-tab-default-hidden"
                                                    } else {
                                                        "first-tab-default-visible"
                                                    }
                                                ))), _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)
                                                ), 2),
                                                _cE("view", _uM("class" to _nC(_uA(
                                                    "first-tab-face",
                                                    if (unref(showBackToTop)) {
                                                        "first-tab-backtop-visible"
                                                    } else {
                                                        "first-tab-backtop-hidden"
                                                    }
                                                ))), _uA(
                                                    _cE("text", _uM("class" to _nC(_uA(
                                                        "tab-arrow-icon",
                                                        if (unref(activeIndex) == 0) {
                                                            "tab-arrow-icon-active"
                                                        } else {
                                                            ""
                                                        }
                                                    ))), "↑", 2),
                                                    _cE("text", _uM("class" to _nC(_uA(
                                                        "tab-label",
                                                        if (unref(activeIndex) == 0) {
                                                            "tab-label-active"
                                                        } else {
                                                            ""
                                                        }
                                                    ))), "回到顶部", 2)
                                                ), 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_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))
                    )
                }
                ), "_" 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("first-tab-button" to _pS(_uM("width" to "100%", "height" to "100%", "flexDirection" to "column", "justifyContent" to "center", "alignItems" to "center")), "first-tab-animator" to _pS(_uM("width" to "100%", "height" to "100%", "position" to "relative", "flexDirection" to "column", "justifyContent" to "center", "alignItems" to "center")), "first-tab-face" to _pS(_uM("width" to "100%", "height" to "100%", "position" to "absolute", "left" to 0, "top" to 0, "flexDirection" to "column", "justifyContent" to "center", "alignItems" to "center", "transitionProperty" to "opacity,transform", "transitionDuration" to "220ms", "transitionTimingFunction" to "ease")), "first-tab-default-visible" to _pS(_uM("opacity" to 1, "transform" to "translateY(0px)")), "first-tab-default-hidden" to _pS(_uM("opacity" to 0, "transform" to "translateY(8px)")), "first-tab-backtop-visible" to _pS(_uM("opacity" to 1, "transform" to "translateY(0px)")), "first-tab-backtop-hidden" to _pS(_uM("opacity" to 0, "transform" to "translateY(-8px)")), "dark-tab-list" to _pS(_uM("backgroundColor" to "#0f172a", "borderTopColor" to "rgba(255,255,255,0.33)")), "dark-tab-content" to _pS(_uM("backgroundColor" to "#111827")), "dark-tab-content-home" to _pS(_uM("backgroundColor" to "#111827")), "dark-tab-content-api" to _pS(_uM("backgroundColor" to "#141c2f")), "dark-tab-content-css" to _pS(_uM("backgroundColor" to "#102126")), "dark-tab-content-template" to _pS(_uM("backgroundColor" to "#161a31")), "tab-icon-image" to _pS(_uM("height" to 24, "width" to 24)), "tab-arrow-icon" to _pS(_uM("lineHeight" to "20px", "marginBottom" to 2, "color" to "rgba(255,255,255,0.68)")), "tab-arrow-icon-active" to _pS(_uM("color" to "#7ce0b8")), "tab-label" to _pS(_uM("fontSize" to 10, "color" to "rgba(255,255,255,0.62)")), "tab-label-active" to _pS(_uM("color" to "#f3f7fb")), "@TRANSITION" to _uM("first-tab-face" to _uM("property" to "opacity,transform", "duration" to "220ms", "timingFunction" to "ease")))
            }
        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()
    }
}
