@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.showToast as uni_showToast
open class GenPagesUniUiNavBarNavBar : 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: GenPagesUniUiNavBarNavBar) -> Any? = fun(__props): Any? {
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenPagesUniUiNavBarNavBar
            val _cache = __ins.renderCache
            val navigationBarTextStyle = ref("black")
            fun gen_clickButton_fn() {
                uni_showToast(ShowToastOptions(title = "点击了按钮"))
            }
            val clickButton = ::gen_clickButton_fn
            onShow(fun(){
                if (state.isDarkMode) {
                    navigationBarTextStyle.value = "white"
                    uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#ffffff", backgroundColor = "#000000"))
                } else {
                    navigationBarTextStyle.value = "black"
                    uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#000000", backgroundColor = "#ffffff"))
                }
            }
            )
            watch(fun(): Boolean {
                return state.isDarkMode
            }
            , fun(newVal: Boolean){
                if (newVal) {
                    navigationBarTextStyle.value = "white"
                    uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#ffffff", backgroundColor = "#000000"))
                } else {
                    navigationBarTextStyle.value = "black"
                    uni_setNavigationBarColor(SetNavigationBarColorOptions(frontColor = "#000000", backgroundColor = "#ffffff"))
                }
            }
            )
            return fun(): Any? {
                val _component_uni_nav_bar = resolveEasyComponent("uni-nav-bar", GenUniModulesUniNavBarComponentsUniNavBarUniNavBarClass)
                return _cE(Fragment, null, _uA(
                    _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle)), null, 8, _uA(
                        "navigationBarTextStyle"
                    )),
                    _cE("scroll-view", _uM("style" to _nS(_uM("flex" to "1", "padding-bottom" to "var(--uni-safe-area-inset-bottom)")), "class" to _nC(if (unref(state).isDarkMode) {
                        "theme-dark"
                    } else {
                        "theme-light"
                    }
                    )), _uA(
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to "black", "title" to "黑色标题")),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to "white", "title" to "青色背景白色标题", "style" to _nS(_uM("background-color" to "cyan"))), null, 8, _uA(
                            "style"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "title" to "下边带灰线", "style" to _nS(_uM("border-bottom" to "0.5px #ccc solid"))), null, 8, _uA(
                            "navigationBarTextStyle",
                            "style"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "hideDefaultBack" to "", "title" to "隐藏左侧返回箭头"), null, 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "title" to "标题居左", "mid-class" to "left-title"), null, 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "title" to "右边有按钮"), _uM("right" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "⋯")
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "title" to "右边有2个按钮", "right-class" to "two-buttons"), _uM("right" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "+"),
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "⋯")
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "title" to "左边有按钮"), _uM("left" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "+")
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle), "title" to "左右各1个按钮"), _uM("left" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "+")
                            )
                        }
                        ), "right" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "⋯")
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle)), _uM("mid" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("style" to _nS(_uM("color" to unref(navigationBarTextStyle)))), "插槽右箭头可以点", 4),
                                _cE("text", _uM("style" to _nS(_uM("padding" to "3px", "font-size" to "10px")), "class" to "uni-theme-text", "onClick" to clickButton), "▼", 4)
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "navigationBarTextStyle"
                        )),
                        _cV(_component_uni_nav_bar, _uM("navigationBarTextStyle" to unref(navigationBarTextStyle)), _uM("left" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "+")
                            )
                        }
                        ), "mid" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("input", _uM("placeholder" to "左中右都是插槽，中间是input", "style" to _nS(_uM("border" to "#ccc 0.5px solid"))), null, 4)
                            )
                        }
                        ), "right" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE("text", _uM("class" to "txt-button", "onClick" to clickButton), "⋯")
                            )
                        }
                        ), "_" to 1), 8, _uA(
                            "navigationBarTextStyle"
                        ))
                    ), 6)
                ), 64)
            }
        }
        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("left-title" to _pS(_uM("justifyContent" to "flex-start")), "two-buttons" to _pS(_uM("width" to 88)), "txt-button" to _pS(_uM("fontWeight" to "bold", "width" to 44, "height" to 44, "lineHeight" to "44px", "textAlign" to "center", "color" to "var(--text-color)")))
            }
        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()
    }
}
