import {
    G as L,
    z as B,
    r as g,
    R as N,
    C as T,
    H as b,
    I as p,
    Q as d,
    O as i,
    au as E,
    N as r,
    K as G,
    M as U,
    J as e,
    an as C,
    P as l,
    a1 as O,
    at as h,
    aX as M,
    aD as R,
    n as $
} from "./common.modules-af1f85b9.js";
import {
    a4 as V,
    G as z,
    aW as A,
    aX as Q,
    B as q,
    aY as H,
    A as X,
    aZ as x,
    _ as P,
    a3 as F
} from "./page-activity-ActivityDetail-09e806d3.js";
import {
    L as J
} from "./page-activity-DailySignIn-a76bf4fc.js";
const K = {
        class: "sysMessage__container"
    },
    Y = {
        class: "sysMessage__container-msgWrapper__item-title"
    },
    Z = {
        class: "sysMessage__container-msgWrapper__item-time"
    },
    ee = {
        class: "sysMessage__container-msgWrapper__item-content"
    },
    se = L({
        __name: "index",
        setup(W) {
            const {
                t: n
            } = B(), {
                setLoading: c
            } = V(), _ = g(), s = z(), v = N(), f = g(!1), o = g([]), D = A(), y = g({
                pageSize: 25
            });

            function S() {
                v.back()
            }
            async function I() {
                const u = A();
                await Q({
                    state: 1
                }).then(t => {
                    t && u.setReadState(!0)
                }).catch(t => {})
            }

            function j(u) {
                O({
                    title: n("warning"),
                    message: n("warningTxt1")
                }).then(async () => {
                    if (await X(x({
                            messageID: u.messageID,
                            state: 2
                        }))) {
                        let k = o.value;
                        o.value = k.filter(m => m.messageID !== u.messageID)
                    }
                })
            }
            const w = s.getUserInfo;
            return T(async () => {
                c(!0), await I(), c(!1), _.value.resetRefresh(), w.unRead = 0, s.setUserInfo({ ...w
                }), D.setReadState(!0)
            }), (u, t) => {
                const k = b("NavBar"),
                    m = b("svg-icon");
                return r(), p("div", K, [d(k, {
                    title: i(n)("notifications"),
                    backgroundColor: "#f7f8ff",
                    "left-arrow": "",
                    onClickLeft: S
                }, null, 8, ["title"]), d(J, {
                    ref_key: "msgWrapperRef",
                    ref: _,
                    list: o.value,
                    "onUpdate:list": t[0] || (t[0] = a => o.value = a),
                    "page-query": y.value,
                    "onUpdate:pageQuery": t[1] || (t[1] = a => y.value = a),
                    api: i(H),
                    distance: 100,
                    isAutoLoad: f.value
                }, {
                    content: E(() => [(r(!0), p(G, null, U(o.value, a => (r(), p("div", {
                        class: "sysMessage__container-msgWrapper__item",
                        key: a.messageID
                    }, [e("div", Y, [C(' <component :is="item.state === 0 ? icons.messageIconRed : icons.messageIconIsRead" /> '), e("div", null, [d(m, {
                        class: "svg",
                        name: a.state === 0 ? "messageIconRed" : "notification"
                    }, null, 8, ["name"]), e("span", null, l(i(q)(a.title, 20)), 1)]), d(m, {
                        class: "svg",
                        name: "messageGarbage",
                        onClick: ce => j(a)
                    }, null, 8, ["onClick"]), C(` <component
							:is="icons.messageGarbage"
							@click="($event: Event) => { $event.stopPropagation(); onDeleteClick(item) }"
						/> `)]), e("div", Z, l(a.addTime), 1), e("div", ee, l(a.messages), 1)]))), 128))]),
                    _: 1
                }, 8, ["list", "page-query", "api", "isAutoLoad"])])
            }
        }
    });
const ae = P(se, [
        ["__scopeId", "data-v-8084bf25"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/home/Messages/index.vue"]
    ]),
    de = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: ae
    }, Symbol.toStringTag, {
        value: "Module"
    })),
    te = {
        class: "messageDetail__container content"
    },
    ne = {
        class: "messageDetail__container-wrapper"
    },
    oe = {
        class: "messageDetail__container-title"
    },
    ie = {
        class: "messageDetail__container-content"
    },
    re = L({
        __name: "index",
        setup(W) {
            const {
                t: n
            } = B(), c = F(), _ = N(), s = g({}), v = R(() => $(() =>
                import ("./messageIconNoDot-84cdc918.js"), ["assets/js/messageIconNoDot-84cdc918.js", "assets/js/common.modules-af1f85b9.js", "assets/css/common-e210f711.css", "assets/js/page-activity-ActivityDetail-09e806d3.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2c2af617.js", "assets/js/en-8dc3e88f.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"])), f = R(() => $(() =>
                import ("./messageGarbage-e54554f0.js"), ["assets/js/messageGarbage-e54554f0.js", "assets/js/common.modules-af1f85b9.js", "assets/css/common-e210f711.css", "assets/js/page-activity-ActivityDetail-09e806d3.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2c2af617.js", "assets/js/en-8dc3e88f.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"]));

            function o() {
                _.back()
            }

            function D() {
                O({
                    title: n("warning"),
                    message: n("warningTxt1")
                }).then(() => {
                    x({
                        messageID: s.value.messageID,
                        state: 2
                    }), _.back()
                })
            }
            return T(async () => {
                s.value = c.getMessagesDetail, s.value.state !== 1 && (await x({
                    messageID: s.value.messageID,
                    state: 1
                }), c.setMessageDetail({ ...s.value,
                    state: 1
                }))
            }), (y, S) => {
                const I = b("NavBar");
                return r(), p("div", te, [d(I, {
                    "left-arrow": "",
                    onClickLeft: o,
                    title: i(n)("notificationDetails")
                }, null, 8, ["title"]), e("div", ne, [e("div", oe, [e("div", null, [e("div", null, [(r(), h(M(i(v)))), e("span", null, l(s.value.title), 1)]), e("span", null, l(s.value.addTime), 1)]), (r(), h(M(i(f)), {
                    onClick: D
                }))]), e("div", ie, l(s.value.messages), 1)])])
            }
        }
    });
const le = P(re, [
        ["__scopeId", "data-v-e5380132"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/home/Messages/MessageDetail/index.vue"]
    ]),
    me = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: le
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    me as a, de as i
};