@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.setNavigationBarColor as uni_setNavigationBarColor
import io.dcloud.uniapp.extapi.setNavigationBarTitle as uni_setNavigationBarTitle
open class GenPagesUniUiTabBarTabBarCustom : 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: GenPagesUniUiTabBarTabBarCustom) -> Any? = fun(__props): Any? {
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenPagesUniUiTabBarTabBarCustom
            val _cache = __ins.renderCache
            val activeIndex = ref<Number>(0)
            fun gen_syncNavigationBar_fn(index: Number): Unit {
                when (index) {
                    0 -> 
                        {
                            uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "精选"))
                            uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#000000", backgroundColor = "#dff3e8"))
                        }
                    1 -> 
                        {
                            uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "趋势"))
                            uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#000000", backgroundColor = "#f6ddbf"))
                        }
                    2 -> 
                        {
                            uni_setNavigationBarTitle(SetNavigationBarTitleOptions(title = "我的"))
                            uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#000000", backgroundColor = "#dde7ea"))
                        }
                }
            }
            val syncNavigationBar = ::gen_syncNavigationBar_fn
            fun gen_handleChange_fn(index: Number): Unit {
                activeIndex.value = index
                syncNavigationBar(index)
            }
            val handleChange = ::gen_handleChange_fn
            onLoad(fun(_options){
                syncNavigationBar(activeIndex.value)
            }
            )
            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-bar-height" to 40, "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(
                                _cE("view", _uM("class" to "custom-panel custom-panel-emerald"), _uA(
                                    _cE("text", _uM("class" to "custom-panel-kicker"), "自定义 tab-bar"),
                                    _cE("text", _uM("class" to "custom-panel-title"), "精选"),
                                    _cE("text", _uM("class" to "custom-panel-desc"), "uni-tab-bar 使用 externalClass 覆盖了渐变背景和更低的高度，整体更像一条轻量导航条。")
                                ))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("view", _uM("class" to "custom-panel custom-panel-sand"), _uA(
                                    _cE("text", _uM("class" to "custom-panel-kicker"), "自定义 tab-bar"),
                                    _cE("text", _uM("class" to "custom-panel-title"), "趋势"),
                                    _cE("text", _uM("class" to "custom-panel-desc"), "这里只有一行文字，没有图标，适合内容频道或资讯场景里的轻型底部切换。")
                                ))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_content, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("view", _uM("class" to "custom-panel custom-panel-ink"), _uA(
                                    _cE("text", _uM("class" to "custom-panel-kicker"), "自定义 tab-bar"),
                                    _cE("text", _uM("class" to "custom-panel-title"), "我的"),
                                    _cE("text", _uM("class" to "custom-panel-desc"), "激活文字色改成绿色，同时每个 uni-tab-item 只有一行文本，更紧凑也更聚焦。")
                                ))
                            )
                        }
                        ), "_" to 1)),
                        _cV(_component_uni_tab_bar, _uM("class" to "custom-tab-list-shell custom-tab-list-root"), _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 "custom-tab-cell"), _uA(
                                            _cE("text", _uM("class" to _nC(_uA(
                                                "custom-tab-label",
                                                if (unref(activeIndex) == 0) {
                                                    "custom-tab-label-active"
                                                } else {
                                                    ""
                                                }
                                            ))), "精选", 2)
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_tab_item, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "custom-tab-cell"), _uA(
                                            _cE("text", _uM("class" to _nC(_uA(
                                                "custom-tab-label",
                                                if (unref(activeIndex) == 1) {
                                                    "custom-tab-label-active"
                                                } else {
                                                    ""
                                                }
                                            ))), "趋势", 2)
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_tab_item, null, _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "custom-tab-cell"), _uA(
                                            _cE("text", _uM("class" to _nC(_uA(
                                                "custom-tab-label",
                                                if (unref(activeIndex) == 2) {
                                                    "custom-tab-label-active"
                                                } else {
                                                    ""
                                                }
                                            ))), "我的", 2)
                                        ))
                                    )
                                }
                                ), "_" to 1))
                            )
                        }
                        ), "_" to 1))
                    )
                }
                ), "_" to 1), 8, _uA(
                    "style",
                    "active-index"
                ))
            }
        }
        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("custom-panel" to _pS(_uM("flexGrow" to 1, "flexShrink" to 1, "flexBasis" to "0%", "paddingTop" to 28, "paddingRight" to 24, "paddingBottom" to 24, "paddingLeft" to 24, "flexDirection" to "column", "justifyContent" to "center")), "custom-panel-emerald" to _pS(_uM("backgroundColor" to "#dff3e8")), "custom-panel-sand" to _pS(_uM("backgroundColor" to "#f6ddbf")), "custom-panel-ink" to _pS(_uM("backgroundColor" to "#dde7ea")), "custom-panel-kicker" to _pS(_uM("fontSize" to 12, "color" to "rgba(34,51,59,0.56)")), "custom-panel-title" to _pS(_uM("marginTop" to 10, "fontSize" to 30, "color" to "#22333b")), "custom-panel-desc" to _pS(_uM("marginTop" to 10, "fontSize" to 15, "lineHeight" to "22px", "color" to "rgba(34,51,59,0.74)")), "custom-tab-list-shell" to _pS(_uM("backgroundColor" to "#f4efe6")), "custom-tab-list-root" to _pS(_uM("backgroundImage" to "linear-gradient(to right, #f7d9a8, #c6ece3)", "backgroundColor" to "rgba(0,0,0,0)", "height" to 40, "borderTopWidth" to 0)), "custom-tab-cell" to _pS(_uM("width" to "100%", "height" to "100%", "flexDirection" to "row", "justifyContent" to "center", "alignItems" to "center")), "custom-tab-label" to _pS(_uM("fontSize" to 14, "color" to "rgba(34,51,59,0.58)")), "custom-tab-label-active" to _pS(_uM("color" to "#1d9f5f")))
            }
        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()
    }
}
