@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 GenPagesUniUiCollapseCollapse : 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)
    }
    open var data: Data__8
        get() {
            return unref(this.`$exposed`["data"]) as Data__8
        }
        set(value) {
            setRefValue(this.`$exposed`, "data", value)
        }
    open var onPanelAClick: () -> Unit
        get() {
            return unref(this.`$exposed`["onPanelAClick"]) as () -> Unit
        }
        set(value) {
            setRefValue(this.`$exposed`, "onPanelAClick", value)
        }
    companion object {
        @Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
        var setup: (__props: GenPagesUniUiCollapseCollapse, __setupCtx: SetupContext) -> Any? = fun(__props, __setupCtx): Any? {
            val __expose = __setupCtx.expose
            val __ins = getCurrentInstance()!!
            val _ctx = __ins.proxy as GenPagesUniUiCollapseCollapse
            val _cache = __ins.renderCache
            val categoryGroups = _uA(
                CategoryGroup(title = "分类1", items = _uA(
                    CategoryItem(title = "分类1-item1"),
                    CategoryItem(title = "分类1-item2"),
                    CategoryItem(title = "分类1-item3")
                )),
                CategoryGroup(title = "分类2", items = _uA(
                    CategoryItem(title = "分类2-item1"),
                    CategoryItem(title = "分类2-item2"),
                    CategoryItem(title = "分类2-item3")
                )),
                CategoryGroup(title = "分类3", items = _uA(
                    CategoryItem(title = "分类3-item1"),
                    CategoryItem(title = "分类3-item2"),
                    CategoryItem(title = "分类3-item3")
                ))
            ) as UTSArray<CategoryGroup>
            val data = reactive<Data__8>(Data__8(lastEvent = "暂无交互", enableOpen = true))
            fun gen_updateEvent_fn(panel: String, open: Boolean) {
                val stateText = if (open) {
                    "展开"
                } else {
                    "收起"
                }
                val message = "" + panel + stateText
                data.lastEvent = message
                console.log("[collapse] " + message)
            }
            val updateEvent = ::gen_updateEvent_fn
            fun gen_onPanelAChange_fn(open: Boolean) {
                updateEvent("面板 A ", open)
            }
            val onPanelAChange = ::gen_onPanelAChange_fn
            fun gen_onPanelBChange_fn(open: Boolean) {
                updateEvent("面板 B ", open)
            }
            val onPanelBChange = ::gen_onPanelBChange_fn
            fun gen_onCategoryChange_fn(title: String, open: Boolean) {
                updateEvent("" + title + " ", open)
            }
            val onCategoryChange = ::gen_onCategoryChange_fn
            val onPanelAClick = fun(){
                console.log("onPanelAClick")
            }
            __expose(_uM("data" to data, "onPanelAClick" to onPanelAClick))
            return fun(): Any? {
                val _component_uni_collapse_item = resolveEasyComponent("uni-collapse-item", GenUniModulesUniCollapseComponentsUniCollapseItemUniCollapseItemClass)
                val _component_uni_collapse = resolveEasyComponent("uni-collapse", GenUniModulesUniCollapseComponentsUniCollapseUniCollapseClass)
                return _cE("scroll-view", _uM("class" to "page"), _uA(
                    _cE("view", _uM("class" to "section"), _uA(
                        _cE("text", _uM("class" to "section-title"), "手风琴模式"),
                        _cV(_component_uni_collapse, _uM("accordion" to true), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(_component_uni_collapse_item, _uM("title" to "面板 A（默认展开）", "open" to unref(data).enableOpen, "onChange" to onPanelAChange), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box", "onClick" to onPanelAClick), _uA(
                                            _cE("text", _uM("class" to "content-text"), "手风琴模式下，同时只会保持一个面板展开。点击当前标题会自动收起其他面板。")
                                        ))
                                    )
                                }
                                ), "_" to 1), 8, _uA(
                                    "open"
                                )),
                                _cV(_component_uni_collapse_item, _uM("title" to "面板 B", "onChange" to onPanelBChange), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("id" to "panel-b", "class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "当前项展开时，其他已展开的项会自动收起。这里用于验证切换动画和事件回调。")
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_collapse_item, _uM("title" to "禁用项", "disabled" to true), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "禁用状态下不会响应点击，也不会触发展开或收起。")
                                        ))
                                    )
                                }
                                ), "_" to 1))
                            )
                        }
                        ), "_" to 1))
                    )),
                    _cE("view", _uM("class" to "section"), _uA(
                        _cE("text", _uM("class" to "section-title"), "普通模式-可同时展开的分组折叠列表"),
                        _cV(_component_uni_collapse, _uM("accordion" to false), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cE(Fragment, null, RenderHelpers.renderList(categoryGroups, fun(group, index, __index, _cached): Any {
                                    return _cV(_component_uni_collapse_item, _uM("key" to group.title, "title" to group.title, "onChange" to fun(`$event`: Any){
                                        onCategoryChange(group.title, `$event` as Boolean)
                                    }
                                    ), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                        return _uA(
                                            _cE("view", _uM("class" to "category-list"), _uA(
                                                _cE(Fragment, null, RenderHelpers.renderList(group.items, fun(item, itemIndex, __index, _cached): Any {
                                                    return _cE("view", _uM("key" to item.title, "class" to _nC(_uA(
                                                        "category-list-item",
                                                        _uM("category-list-item--last" to (itemIndex == group.items.length - 1))
                                                    ))), _uA(
                                                        _cE("text", _uM("class" to "category-list-text"), _tD(item.title), 1),
                                                        _cE("view", _uM("class" to "category-list-arrow"))
                                                    ), 2)
                                                }
                                                ), 128)
                                            ))
                                        )
                                    }
                                    ), "_" to 2), 1032, _uA(
                                        "title",
                                        "onChange"
                                    ))
                                }
                                ), 64)
                            )
                        }
                        ), "_" to 1))
                    )),
                    _cE("view", _uM("class" to "section"), _uA(
                        _cE("text", _uM("class" to "section-title"), "externalClass 示例"),
                        _cV(_component_uni_collapse, _uM("accordion" to false), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(_component_uni_collapse_item, _uM("title" to "自定义标题文字", "title-class" to "demo-title-emphasis"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "通过 title-class 可以覆盖 title 属性对应 text 组件的样式。")
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_collapse_item, _uM("title" to "自定义箭头样式", "arrow-class" to "demo-arrow-large"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "通过 arrow-class 可以覆盖默认箭头 view 的尺寸、边框粗细和颜色。")
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_collapse_item, _uM("title" to "同时自定义标题和箭头", "title-class" to "demo-title-accent", "arrow-class" to "demo-arrow-accent"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "title-class 和 arrow-class 可以组合使用。")
                                        ))
                                    )
                                }
                                ), "_" to 1))
                            )
                        }
                        ), "_" to 1))
                    )),
                    _cE("view", _uM("class" to "section"), _uA(
                        _cE("text", _uM("class" to "section-title"), "具名插槽标题"),
                        _cV(_component_uni_collapse, _uM("accordion" to false), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(_component_uni_collapse_item, null, _uM("title" to withScopedSlotCtx(fun(slotProps: GenUniModulesUniCollapseComponentsUniCollapseItemUniCollapseItemSlotDataTitle): UTSArray<Any> {
                                    val open = slotProps.open
                                    val disabled = slotProps.disabled
                                    return _uA(
                                        _cE("view", _uM("class" to "slot-title-wrap"), _uA(
                                            _cE("view", _uM("class" to _nC(_uA(
                                                "slot-title-icon",
                                                _uM("slot-title-icon--open" to open, "slot-title-icon--disabled" to disabled)
                                            ))), null, 2),
                                            _cE("text", _uM("class" to _nC(_uA(
                                                "slot-title-text",
                                                _uM("slot-title-text--open" to open, "slot-title-text--disabled" to disabled)
                                            ))), "消息中心", 2),
                                            _cE("text", _uM("class" to _nC(_uA(
                                                "slot-title-badge",
                                                _uM("slot-title-badge--open" to open)
                                            ))), _tD(if (isTruthy(open)) {
                                                "OPEN"
                                            } else {
                                                "CLOSE"
                                            }
                                            ), 3)
                                        ))
                                    )
                                }
                                ), "default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "通过 #title 可以自定义标题区域结构，例如在文字前增加图标、状态徽标和辅助说明。")
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_collapse_item, null, _uM("title" to withScopedSlotCtx(fun(slotProps: GenUniModulesUniCollapseComponentsUniCollapseItemUniCollapseItemSlotDataTitle): UTSArray<Any> {
                                    val open = slotProps.open
                                    return _uA(
                                        _cE("view", _uM("class" to "slot-title-wrap"), _uA(
                                            _cE("view", _uM("class" to _nC(_uA(
                                                "slot-title-icon slot-title-icon--secondary",
                                                _uM("slot-title-icon--open" to open)
                                            ))), null, 2),
                                            _cE("text", _uM("class" to _nC(_uA(
                                                "slot-title-text",
                                                _uM("slot-title-text--open" to open)
                                            ))), "设置中心", 2),
                                            _cE("text", _uM("class" to "slot-title-note"), _tD(if (isTruthy(open)) {
                                                "当前已展开"
                                            } else {
                                                "点击展开配置项"
                                            }
                                            ), 1)
                                        ))
                                    )
                                }
                                ), "default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text"), "具名插槽会透出 open 和 disabled 状态，方便你在标题区域里联动样式。")
                                        ))
                                    )
                                }
                                ), "_" to 1))
                            )
                        }
                        ), "_" to 1))
                    )),
                    _cE("view", _uM("class" to "section section-dark"), _uA(
                        _cE("text", _uM("class" to "section-title section-title-dark"), "暗黑模式 externalClass 示例"),
                        _cE("view", _uM("class" to "dark-tip"), _uA(
                            _cE("text", _uM("class" to "dark-tip-text"), "这个示例通过给 uni-collapse-item 传入 class 和 externalClass，分别定制内容区和标题区样式。")
                        )),
                        _cV(_component_uni_collapse, _uM("accordion" to false), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                            return _uA(
                                _cV(_component_uni_collapse_item, _uM("class" to "dark-collapse-item", "title" to "暗色标题 A", "open" to true, "title-wrap-class" to "dark-title-wrap", "title-class" to "dark-title-text", "title-open-class" to "dark-title-text-open", "arrow-class" to "dark-arrow", "arrow-open-class" to "dark-arrow-open"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box dark-content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text dark-content-text"), "组件根节点通过 class 统一接入暗色卡片样式，标题背景、默认文字、展开态文字和箭头颜色通过 externalClass 传入。")
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_collapse_item, _uM("class" to "dark-collapse-item dark-collapse-item-strong", "title" to "暗色标题 B", "title-wrap-class" to "dark-title-wrap-strong", "title-class" to "dark-title-text-strong", "title-open-class" to "dark-title-text-open", "arrow-class" to "dark-arrow-strong", "arrow-open-class" to "dark-arrow-open"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box dark-content-box"), _uA(
                                            _cE("text", _uM("class" to "content-text dark-content-text"), "你也可以继续组合不同的根容器 class、标题字重、箭头粗细和激活色样式。")
                                        ))
                                    )
                                }
                                ), "_" to 1)),
                                _cV(_component_uni_collapse_item, _uM("class" to "dark-collapse-item dark-collapse-item-muted", "title" to "暗色禁用项", "disabled" to true, "title-wrap-class" to "dark-title-wrap-muted", "title-class" to "dark-title-text", "title-disabled-class" to "dark-title-text-disabled", "arrow-class" to "dark-arrow", "arrow-disabled-class" to "dark-arrow-disabled"), _uM("default" to withSlotCtx(fun(): UTSArray<Any> {
                                    return _uA(
                                        _cE("view", _uM("class" to "content-box dark-content-box dark-content-box-muted"), _uA(
                                            _cE("text", _uM("class" to "content-text dark-content-text"), "禁用态默认通过透明度表达状态，外部依然可以继续指定禁用态文字和箭头颜色。")
                                        ))
                                    )
                                }
                                ), "_" to 1))
                            )
                        }
                        ), "_" to 1))
                    )),
                    _cE("view", _uM("class" to "log-section"), _uA(
                        _cE("text", _uM("class" to "log-title"), "最近事件"),
                        _cE("text", _uM("class" to "log-text"), _tD(unref(data).lastEvent), 1)
                    ))
                ))
            }
        }
        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("page" to _pS(_uM("flexGrow" to 1, "flexShrink" to 1, "flexBasis" to "0%", "paddingTop" to 12, "paddingRight" to 12, "paddingBottom" to 12, "paddingLeft" to 12)), "section" to _pS(_uM("marginBottom" to 12, "borderTopLeftRadius" to 8, "borderTopRightRadius" to 8, "borderBottomRightRadius" to 8, "borderBottomLeftRadius" to 8, "overflow" to "hidden", "backgroundColor" to "var(--list-background-color, #ffffff)")), "section-title" to _pS(_uM("paddingTop" to 12, "paddingRight" to 12, "paddingBottom" to 12, "paddingLeft" to 12, "fontSize" to 14, "color" to "var(--text-color, #333333)", "fontWeight" to 500)), "content-box" to _pS(_uM("paddingTop" to 12, "paddingRight" to 12, "paddingBottom" to 12, "paddingLeft" to 12, "backgroundColor" to "var(--active-background-color, #f8fafc)")), "content-text" to _pS(_uM("fontSize" to 13, "color" to "var(--text-color, #475569)", "opacity" to 0.78, "lineHeight" to "20px")), "category-list" to _pS(_uM("backgroundColor" to "var(--active-background-color, #f8fafc)")), "category-list-item" to _pS(_uM("flexDirection" to "row", "alignItems" to "center", "justifyContent" to "space-between", "paddingTop" to 12, "paddingRight" to 18, "paddingBottom" to 12, "paddingLeft" to 18, "borderBottomWidth" to 1, "borderBottomStyle" to "solid", "borderBottomColor" to "var(--border-color, #e2e8f0)")), "category-list-item--last" to _pS(_uM("borderBottomWidth" to 0)), "category-list-text" to _pS(_uM("flexGrow" to 1, "flexShrink" to 1, "flexBasis" to "0%", "fontSize" to 13, "color" to "var(--text-color, #334155)", "lineHeight" to "20px")), "category-list-arrow" to _pS(_uM("width" to 8, "height" to 8, "marginLeft" to 12, "transform" to "rotate(-45deg)", "borderRightWidth" to 1, "borderRightStyle" to "solid", "borderRightColor" to "var(--arrow-color, #94a3b8)", "borderBottomWidth" to 1, "borderBottomStyle" to "solid", "borderBottomColor" to "var(--arrow-color, #94a3b8)")), "demo-title-emphasis" to _pS(_uM("fontSize" to 16, "fontWeight" to 700)), "demo-title-accent" to _pS(_uM("fontSize" to 15, "fontWeight" to 700, "color" to "#0f766e")), "demo-arrow-large" to _pS(_uM("width" to 12, "height" to 12, "borderRightWidth" to 2, "borderBottomWidth" to 2)), "demo-arrow-accent" to _pS(_uM("borderRightColor" to "#0f766e", "borderBottomColor" to "#0f766e", "borderRightWidth" to 2, "borderBottomWidth" to 2)), "slot-title-wrap" to _pS(_uM("flexGrow" to 1, "flexShrink" to 1, "flexBasis" to "0%", "flexDirection" to "row", "alignItems" to "center")), "slot-title-icon" to _pS(_uM("width" to 10, "height" to 10, "borderTopLeftRadius" to 5, "borderTopRightRadius" to 5, "borderBottomRightRadius" to 5, "borderBottomLeftRadius" to 5, "marginRight" to 10, "backgroundColor" to "#94a3b8")), "slot-title-icon--secondary" to _pS(_uM("backgroundColor" to "#c084fc")), "slot-title-icon--open" to _pS(_uM("backgroundColor" to "#2563eb")), "slot-title-icon--disabled" to _pS(_uM("backgroundColor" to "#cbd5e1")), "slot-title-text" to _pS(_uM("flexGrow" to 1, "flexShrink" to 1, "flexBasis" to "0%", "fontSize" to 14, "color" to "var(--text-color, #1f2937)", "fontWeight" to 600)), "slot-title-text--open" to _pS(_uM("color" to "#2563eb")), "slot-title-text--disabled" to _pS(_uM("color" to "#94a3b8")), "slot-title-badge" to _pS(_uM("paddingTop" to 4, "paddingRight" to 8, "paddingBottom" to 4, "paddingLeft" to 8, "borderTopLeftRadius" to 10, "borderTopRightRadius" to 10, "borderBottomRightRadius" to 10, "borderBottomLeftRadius" to 10, "backgroundColor" to "#e2e8f0", "fontSize" to 11, "color" to "#475569")), "slot-title-badge--open" to _pS(_uM("backgroundColor" to "#dbeafe", "color" to "#1d4ed8")), "slot-title-note" to _pS(_uM("fontSize" to 12, "color" to "#64748b")), "section-dark" to _pS(_uM("backgroundColor" to "#111827")), "section-title-dark" to _pS(_uM("color" to "#e5e7eb")), "dark-collapse-item" to _pS(_uM("backgroundColor" to "#111827")), "dark-collapse-item-strong" to _pS(_uM("backgroundColor" to "#0f172a")), "dark-collapse-item-muted" to _pS(_uM("backgroundColor" to "#101826")), "dark-tip" to _pS(_uM("paddingTop" to 0, "paddingRight" to 12, "paddingBottom" to 12, "paddingLeft" to 12)), "dark-tip-text" to _pS(_uM("fontSize" to 12, "color" to "#9ca3af", "lineHeight" to "18px")), "dark-content-box" to _pS(_uM("backgroundColor" to "#1f2937")), "dark-content-text" to _pS(_uM("color" to "#cbd5e1")), "dark-content-box-muted" to _pS(_uM("backgroundColor" to "#182333")), "dark-title-wrap" to _pS(_uM("backgroundColor" to "#111827")), "dark-title-wrap-strong" to _pS(_uM("backgroundColor" to "#0f172a")), "dark-title-wrap-muted" to _pS(_uM("backgroundColor" to "#101826")), "dark-title-text" to _pS(_uM("color" to "#f8fafc")), "dark-title-text-strong" to _pS(_uM("fontSize" to 15, "fontWeight" to 700, "color" to "#e2e8f0")), "dark-title-text-open" to _pS(_uM("color" to "#60a5fa")), "dark-title-text-disabled" to _pS(_uM("color" to "#94a3b8")), "dark-arrow" to _pS(_uM("borderRightColor" to "#cbd5e1", "borderBottomColor" to "#cbd5e1")), "dark-arrow-strong" to _pS(_uM("borderRightColor" to "#cbd5e1", "borderBottomColor" to "#cbd5e1", "borderRightWidth" to 2, "borderBottomWidth" to 2)), "dark-arrow-open" to _pS(_uM("borderRightColor" to "#60a5fa", "borderBottomColor" to "#60a5fa")), "dark-arrow-disabled" to _pS(_uM("borderRightColor" to "#94a3b8", "borderBottomColor" to "#94a3b8")), "log-section" to _pS(_uM("paddingTop" to 12, "paddingRight" to 12, "paddingBottom" to 12, "paddingLeft" to 12, "borderTopLeftRadius" to 8, "borderTopRightRadius" to 8, "borderBottomRightRadius" to 8, "borderBottomLeftRadius" to 8, "backgroundColor" to "var(--list-background-color, #ffffff)")), "log-title" to _pS(_uM("fontSize" to 13, "color" to "var(--text-color, #333333)", "fontWeight" to 500, "marginBottom" to 8)), "log-text" to _pS(_uM("fontSize" to 13, "color" to "#2563eb")))
            }
        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()
    }
}
