@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
open class GenUniModulesUniTabBarComponentsUniTabContentUniTabContent : VueComponent {
    constructor(__ins: ComponentInternalInstance) : super(__ins) {}
    companion object {
        @Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
        var setup: (__props: GenUniModulesUniTabBarComponentsUniTabContentUniTabContent) -> Any? = fun(__props): Any? {
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenUniModulesUniTabBarComponentsUniTabContentUniTabContent
            val _cache = __ins.renderCache
            val currentIndex = inject<Ref<Number>>("uniTabBarCurrentIndex", ref(0))
            val registerContent = inject<() -> Number>("uniTabBarRegisterContent", fun(): Number {
                return 0
            }
            )
            val contentBottom = inject<Ref<Number>>("uniTabBarContentBottom", ref(0))
            val contentIndex = ref<Number>(-1)
            val hasRendered = ref<Boolean>(false)
            onMounted(fun(){
                contentIndex.value = registerContent()
                if (contentIndex.value == currentIndex.value) {
                    hasRendered.value = true
                }
            }
            )
            val isActive = computed(fun(): Boolean {
                return currentIndex.value == contentIndex.value
            }
            )
            watch(fun(): Boolean {
                return isActive.value
            }
            , fun(newValue: Boolean){
                if (newValue && hasRendered.value == false) {
                    hasRendered.value = true
                }
            }
            )
            return fun(): Any? {
                return if (isTrue(unref(hasRendered))) {
                    _cE("view", _uM("key" to 0, "class" to "uni-tab-content-root", "style" to _nS(_uM("visibility" to if (unref(isActive)) {
                        "visible"
                    } else {
                        "hidden"
                    }, "bottom" to (unref(contentBottom) + "px")))), _uA(
                        renderSlot(_ctx.`$slots`, "default")
                    ), 4)
                } else {
                    _cC("v-if", true)
                }
            }
        }
        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("uni-tab-content-root" to _pS(_uM("width" to "100%", "position" to "absolute", "left" to 0, "top" to 0, "flexDirection" to "column")))
            }
        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()
    }
}
