@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 GenUniModulesUniTabBarComponentsUniTabItemUniTabItem : VueComponent {
    constructor(__ins: ComponentInternalInstance) : super(__ins) {}
    open var badgeText: String? by `$props`
    open var badgeClass: Any? by `$props`
    companion object {
        @Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
        var setup: (__props: GenUniModulesUniTabBarComponentsUniTabItemUniTabItem) -> Any? = fun(__props): Any? {
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenUniModulesUniTabBarComponentsUniTabItemUniTabItem
            val _cache = __ins.renderCache
            val props = __props
            val registerItem = inject<() -> Number>("uniTabListRegisterItem", fun(): Number {
                return 0
            }
            )
            val getItemLayout = inject<(index: Number) -> UniTabListItemLayout>("uniTabListGetItemLayout", fun(index: Number): UniTabListItemLayout {
                return UniTabListItemLayout(width = 0, marginLeft = 0)
            }
            )
            val changeTab = inject<(index: Number) -> Unit>("uniTabListChangeTab", fun(index: Number){})
            val itemIndex = ref<Number>(-1)
            val itemStyle = computed(fun(): UTSJSONObject {
                if (itemIndex.value < 0) {
                    return _uO("width" to "0px", "marginLeft" to "0px")
                }
                val layout = getItemLayout(itemIndex.value)
                return _uO("width" to (layout.width + "px"), "marginLeft" to (layout.marginLeft + "px"))
            }
            )
            onMounted(fun(){
                itemIndex.value = registerItem()
            }
            )
            fun gen_handleClick_fn(): Unit {
                if (itemIndex.value >= 0) {
                    changeTab(itemIndex.value)
                }
            }
            val handleClick = ::gen_handleClick_fn
            return fun(): Any? {
                return _cE("view", _uM("style" to _nS(unref(itemStyle)), "class" to "uni-tab-list-item-root", "onClick" to withModifiers(handleClick, _uA(
                    "stop"
                ))), _uA(
                    renderSlot(_ctx.`$slots`, "default"),
                    if (isTrue(props.badgeText != null && props.badgeText != "0" && props.badgeText != "")) {
                        _cE("text", _uM("key" to 0, "class" to _nC(_uA(
                            "uni-tab-list-item-badge-position uni-tab-list-item-badge-text",
                            props.badgeClass
                        ))), _tD(props.badgeText), 3)
                    } else {
                        if (isTrue(props.badgeText != null && props.badgeText != "0")) {
                            _cE("view", _uM("key" to 1, "class" to _nC(_uA(
                                "uni-tab-list-item-badge-position uni-tab-list-item-badge-dot",
                                props.badgeClass
                            ))), null, 2)
                        } else {
                            _cC("v-if", true)
                        }
                    }
                ), 4)
            }
        }
        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-list-item-root" to _pS(_uM("height" to "100%", "flexShrink" to 0, "display" to "flex", "flexDirection" to "column", "justifyContent" to "center", "alignItems" to "center", "position" to "relative", "overflow" to "visible")), "uni-tab-list-item-badge-position" to _pS(_uM("position" to "absolute", "top" to 7, "left" to "50%", "transform" to "translate(25%, -50%)")), "uni-tab-list-item-badge-text" to _pS(_uM("backgroundColor" to "rgb(225,80,80)", "minWidth" to 14, "height" to 14, "lineHeight" to "14px", "borderTopLeftRadius" to 7, "borderTopRightRadius" to 7, "borderBottomRightRadius" to 7, "borderBottomLeftRadius" to 7, "fontSize" to 10, "color" to "#FFFFFF", "textAlign" to "center", "whiteSpace" to "nowrap")), "uni-tab-list-item-badge-dot" to _pS(_uM("backgroundColor" to "rgb(225,80,80)", "width" to 8, "height" to 8, "borderTopLeftRadius" to 4, "borderTopRightRadius" to 4, "borderBottomRightRadius" to 4, "borderBottomLeftRadius" to 4, "marginLeft" to 7)))
            }
        var inheritAttrs = true
        var inject: Map<String, Map<String, Any?>> = _uM()
        var emits: Map<String, Any?> = _uM()
        var props = _nP(_uM("badgeText" to _uM("type" to "String", "required" to false), "badgeClass" to _uM("required" to false, "default" to "", "externalClasses" to true, "skipCheck" to true)))
        var propsNeedCastKeys = _uA(
            "badgeClass"
        )
        var components: Map<String, CreateVueComponent> = _uM()
    }
}
