import { _ as V } from "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { u as D } from "./useModal-CO65vga3.js";
import { d as M, bk as O, a4 as B, r as U, dL as F, c as a, o as e, l as o, w as s, h as l, D as g, a9 as k, c6 as z, j as f, i, A as x, cS as H, F as h, ae as G, p as w, N as j, cC as W, gM as Y, v as $, __tla as __tla_0 } from "./index-9PRMimni.js";
import { A as y, a as q, D as v, __tla as __tla_1 } from "./index.vue_vue_type_style_index_0_scoped_b974e5ec_lang-_0QwzFKM.js";
import { _ as J, a as K } from "./TimelineItem-Bkds7ZW8.js";
import { _ as Q } from "./Flex-CTSf12gq.js";
let _e;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    let X, Z, ee, oe, se, te, ne;
    X = {
        key: 0,
        class: "w-[14px] h-[14px] rounded-full bg-[#D24C4C]"
    };
    Z = {
        key: 1,
        class: "w-[14px] h-[14px] rounded-full bg-[#18A058]"
    };
    ee = {
        key: 0,
        class: "w-[14px] h-[14px] rounded-full border-[2px] border-[#dbdbdf] bg-white"
    };
    oe = {
        key: 1,
        class: "w-[14px] h-[14px] rounded-full border-[2px] border-[#18A058] bg-white"
    };
    se = {
        class: "text-[14px] font-semibold"
    };
    te = {
        key: 0
    };
    ne = M({
        __name: "index",
        props: {
            busId: {},
            moduleCode: {},
            subModuleCode: {}
        },
        setup (N, { expose: P }) {
            const c = O(), L = N, E = B(()=>r.value.length > 0 && F(r.value)?.isPass === y.APPROVED), r = U([]), [C, { openModal: S }] = D({
                title: c.getLocale == "en" ? "History" : "历史",
                width: 500
            });
            async function I(A) {
                const n = A ?? L;
                if (n.busId === void 0 || n.moduleCode === void 0) throw new Error("必须在 props 或传入的 record 中提供 busId 和 moduleCode, subModuleCode 可选");
                const { busId: u, moduleCode: _, subModuleCode: p, ...b } = n, m = await Y({
                    busId: u,
                    moduleCode: _,
                    subModuleCode: p,
                    ...b
                });
                r.value = m, S();
            }
            return P({
                handleOpenModal: I
            }), (A, n)=>{
                const u = j, _ = G, p = Q, b = H, m = K, R = J, T = W;
                return e(), a(o(V), {
                    onRegister: o(C),
                    "show-action": !1
                }, {
                    default: s(()=>[
                            o(r).length > 0 ? (e(), a(R, {
                                key: 0
                            }, {
                                default: s(()=>[
                                        (e(!0), l(h, null, k(o(r), (t)=>(e(), a(m, {
                                                time: t.operateTime ?? t.createTime,
                                                key: t.id,
                                                type: "info"
                                            }, z({
                                                icon: s(()=>[
                                                        t.isActive === 1 ? (e(), a(u, {
                                                            key: 0,
                                                            class: "text-[#2180F1] animate-pulse inline-flex items-center justify-center rounded-full",
                                                            style: {
                                                                "box-shadow": "0 0 8px rgba(33, 128, 241, 0.6)"
                                                            },
                                                            size: 14
                                                        }, {
                                                            default: s(()=>n[0] || (n[0] = [
                                                                    i("div", {
                                                                        class: "w-[14px] h-[14px] rounded-full border-[2px] border-[#2180F1] bg-white"
                                                                    }, null, -1)
                                                                ])),
                                                            _: 1
                                                        })) : (e(), a(u, {
                                                            key: 1,
                                                            class: "text-[#17B6EB]",
                                                            size: 14
                                                        }, {
                                                            default: s(()=>[
                                                                    t.isPass === o(y).PENDING_APPROVAL ? (e(), l("div", ee)) : (e(), l("div", oe))
                                                                ]),
                                                            _: 2
                                                        }, 1024))
                                                    ]),
                                                header: s(()=>[
                                                        f(p, {
                                                            align: "center"
                                                        }, {
                                                            default: s(()=>[
                                                                    i("div", se, x(t.username), 1),
                                                                    i("div", null, [
                                                                        (e(!0), l(h, null, k(o(q), (d)=>(e(), l(h, {
                                                                                key: d.value
                                                                            }, [
                                                                                t.isPass == d.value ? (e(), a(_, {
                                                                                    key: 0,
                                                                                    class: "rounded-[5px]",
                                                                                    type: d.type(t),
                                                                                    size: "small"
                                                                                }, {
                                                                                    default: s(()=>[
                                                                                            w(x(o(c).getLocale == "en" ? d.labelEn : d.label), 1)
                                                                                        ]),
                                                                                    _: 2
                                                                                }, 1032, [
                                                                                    "type"
                                                                                ])) : g("", !0)
                                                                            ], 64))), 128))
                                                                    ])
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                default: s(()=>[
                                                        f(p, {
                                                            vertical: "",
                                                            gap: "8px"
                                                        }, {
                                                            default: s(()=>[
                                                                    i("div", null, x(t.comment), 1),
                                                                    t.signUrl ? (e(), l("div", te, [
                                                                        f(b, {
                                                                            class: "border-[1px] border-gray-300",
                                                                            width: "60",
                                                                            src: t.signUrl
                                                                        }, null, 8, [
                                                                            "src"
                                                                        ])
                                                                    ])) : g("", !0)
                                                                ]),
                                                            _: 2
                                                        }, 1024)
                                                    ]),
                                                _: 2
                                            }, [
                                                t.isPass !== o(y).PENDING_APPROVAL ? {
                                                    name: "icon",
                                                    fn: s(()=>[
                                                            t.isPass === o(y).RETURNED ? (e(), l("div", X)) : (e(), l("div", Z))
                                                        ]),
                                                    key: "0"
                                                } : void 0
                                            ]), 1032, [
                                                "time"
                                            ]))), 128)),
                                        o(E) ? (e(), a(m, {
                                            key: 0,
                                            type: "info"
                                        }, {
                                            icon: s(()=>n[1] || (n[1] = [
                                                    i("div", {
                                                        class: "w-[14px] h-[14px] rounded-full bg-[#18A058]"
                                                    }, null, -1)
                                                ])),
                                            default: s(()=>[
                                                    f(_, {
                                                        type: o(v).TYPE,
                                                        class: "rounded-[5px]",
                                                        size: "small"
                                                    }, {
                                                        default: s(()=>[
                                                                w(x(o(c).getLocale == "en" ? o(v).LABEL_EN : o(v).LABEL), 1)
                                                            ]),
                                                        _: 1
                                                    }, 8, [
                                                        "type"
                                                    ])
                                                ]),
                                            _: 1
                                        })) : g("", !0)
                                    ]),
                                _: 1
                            })) : (e(), a(T, {
                                key: 1,
                                description: o(c).getLocale == "en" ? "No history available" : "暂无历史记录"
                            }, null, 8, [
                                "description"
                            ]))
                        ]),
                    _: 1
                }, 8, [
                    "onRegister"
                ]);
            };
        }
    });
    _e = $(ne, [
        [
            "__scopeId",
            "data-v-942f7814"
        ]
    ]);
});
export { _e as H, __tla };
