@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.`$emit` as uni__emit
open class GenPagesUniUiTabBarTabContent1 : VueComponent {
    constructor(__ins: ComponentInternalInstance) : super(__ins) {}
    open var scrollToTop: () -> Unit
        get() {
            return unref(this.`$exposed`["scrollToTop"]) as () -> Unit
        }
        set(value) {
            setRefValue(this.`$exposed`, "scrollToTop", value)
        }
    companion object {
        @Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
        var setup: (__props: GenPagesUniUiTabBarTabContent1, __setupCtx: SetupContext) -> Any? = fun(__props, __setupCtx): Any? {
            val __expose = __setupCtx.expose
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenPagesUniUiTabBarTabContent1
            val _cache = __ins.renderCache
            val TAB_CONTENT1_SCROLL_EVENT = "uni-tab-bar-tab-content1-scroll"
            val activeIndex = inject<Ref<Number>>("uniTabBarCurrentIndex", ref(0))
            val currentScrollTop = ref<Number>(0)
            val targetScrollTop = ref<Number>(0)
            fun gen_handleScroll_fn(event: UniScrollEvent): Unit {
                currentScrollTop.value = event.detail.scrollTop
                uni__emit(TAB_CONTENT1_SCROLL_EVENT, currentScrollTop.value)
            }
            val handleScroll = ::gen_handleScroll_fn
            fun gen_scrollToTop_fn(): Unit {
                targetScrollTop.value = currentScrollTop.value
                nextTick(fun(){
                    targetScrollTop.value = 0
                }
                )
            }
            val scrollToTop = ::gen_scrollToTop_fn
            onMounted(fun(){
                uni__emit(TAB_CONTENT1_SCROLL_EVENT, 0)
            }
            )
            __expose(_uM("scrollToTop" to scrollToTop))
            return fun(): Any? {
                return _cE("scroll-view", _uM("class" to "content-page", "scroll-with-animation" to true, "scroll-top" to unref(targetScrollTop), "onScroll" to handleScroll), _uA(
                    _cE("view", _uM("class" to "content-page-inner"), _uA(
                        _cE("text", _uM("class" to "page-title"), "首页"),
                        _cE("text", _uM("class" to "page-text"), "这是首页的内容"),
                        _cE("text", _uM("class" to "page-text"), "当前索引: " + _tD(unref(activeIndex)), 1),
                        _cE("text", _uM("class" to "page-text"), "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n点首页tab可滚动回顶部（mid-button示例无效）\n\n\n\n")
                    ))
                ), 40, _uA(
                    "scroll-top"
                ))
            }
        }
        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("content-page" to _pS(_uM("width" to "100%", "height" to "100%", "backgroundColor" to "#f5f5f5")), "content-page-inner" to _pS(_uM("width" to "100%", "alignItems" to "center", "flexDirection" to "column", "justifyContent" to "flex-start", "paddingTop" to 20, "paddingRight" to 20, "paddingBottom" to 50, "paddingLeft" to 20)), "page-title" to _pS(_uM("fontSize" to 28, "fontWeight" to "bold", "color" to "#333333", "marginBottom" to 20)), "page-text" to _pS(_uM("fontSize" to 16, "color" to "#666666", "marginBottom" to 10)))
            }
        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()
    }
}
