import {
    G as B,
    H as C,
    I as _,
    J as e,
    P as t,
    Q as l,
    aB as a,
    N as r,
    z as J,
    R as U,
    r as S,
    B as W,
    C as H,
    aA as K,
    av as q,
    O as i,
    au as k,
    ao as g,
    K as A,
    M as z,
    ax as E,
    aC as O,
    aD as Q
} from "./common.modules-5cfe2cf4.js";
import {
    _ as Z,
    G as x,
    y as ee,
    cP as oe,
    h as te,
    L as P
} from "./page-activity-ActivityDetail-a58ec568.js";
import {
    u as ne
} from "./page-promotion-TeamReport-f118558d.js";
const se = {
        class: "container"
    },
    ae = {
        class: "amount"
    },
    ie = {
        class: "amount_txt"
    },
    re = {
        class: "tip"
    },
    le = {
        class: "info_content"
    },
    ce = {
        class: "info"
    },
    _e = {
        class: "head"
    },
    de = {
        class: "line1 r"
    },
    ue = {
        class: "line2 r"
    },
    me = {
        class: "line3 r"
    },
    ve = {
        class: "line1 r"
    },
    he = {
        class: "info"
    },
    pe = {
        class: "head u2"
    },
    ge = {
        class: "line1"
    },
    Ce = {
        class: "line2"
    },
    ye = {
        class: "line3"
    },
    Re = {
        class: "line1"
    },
    fe = B({
        __name: "index",
        props: {
            promotion: {
                type: null,
                required: !0
            }
        },
        setup(d) {
            return (o, I) => {
                var c, u;
                const v = C("svg-icon");
                return r(), _("div", se, [e("div", ae, t(o.promotion.children_Lv_RebateAmount_Yesterday), 1), e("div", ie, t(o.$t("heroYesterdaytotalCommission")), 1), e("div", re, t(o.$t("heroUpgradeLevel")), 1), e("div", le, [e("div", ce, [e("div", _e, [l(v, {
                    name: "directSubordinates"
                }), a(" " + t(o.$t("heroDirectSub")), 1)]), e("div", de, [e("div", null, t(o.promotion.children_Lv_1_Count_Add_Yesterday), 1), a(" " + t(o.$t("registernum")), 1)]), e("div", ue, [e("div", null, t(o.promotion.children_Lv_1_RechargesSumCount), 1), a(" " + t(o.$t("rechargeNumber")), 1)]), e("div", me, [e("div", null, t(o.promotion.children_Lv_1_RechargesSumAmount), 1), a(" " + t(o.$t("rechageAmount")), 1)]), e("div", ve, [e("div", null, t((c = o.promotion) == null ? void 0 : c.children_Lv_1_FirstRechargesCount), 1), a(" " + t(o.$t("firstRechargesC")), 1)])]), e("div", he, [e("div", pe, [l(v, {
                    name: "teamSubordinates"
                }), a(t(o.$t("heroTeamSub")), 1)]), e("div", ge, [e("div", null, t(o.promotion.children_Lv_Count_X_Add_Yesterday), 1), a(" " + t(o.$t("registernum")), 1)]), e("div", Ce, [e("div", null, t(o.promotion.children_Lv_RechargesSumCount), 1), a(" " + t(o.$t("rechargeNumber")), 1)]), e("div", ye, [e("div", null, t(o.promotion.children_Lv_RechargesSumAmount), 1), a(" " + t(o.$t("rechageAmount")), 1)]), e("div", Re, [e("div", null, t((u = o.promotion) == null ? void 0 : u.children_Lv_FirstRechargesCount), 1), a(" " + t(o.$t("firstRechargesC")), 1)])])])])
            }
        }
    });
const be = Z(fe, [
        ["__scopeId", "data-v-6cf5705a"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/Promotion/HeroSection/index.vue"]
    ]),
    w = d => (O("data-v-600663f7"), d = d(), Q(), d),
    Le = {
        class: "content"
    },
    $e = {
        class: "shareBtnContainer"
    },
    Se = {
        class: "promote__cell"
    },
    ke = ["onClick"],
    Ae = {
        class: "label"
    },
    Pe = {
        class: "arrow"
    },
    Be = {
        class: "commission"
    },
    we = {
        class: "commission__title"
    },
    Ie = {
        class: "commission__body"
    },
    Ne = w(() => e("span", null, null, -1)),
    De = {
        class: "commission__body"
    },
    Ye = w(() => e("span", null, null, -1)),
    Me = B({
        __name: "index",
        setup(d) {
            ne(["TeamReport"]);
            const {
                t: o
            } = J(), v = x().getUserInfo, c = U(), u = S(!1), N = ee(), D = W(() => [!!(N.getIsPartnerReward && v.isPartnerReward === "1") && {
                title: o("TeamPartner"),
                name: "team_partner",
                path: "TeamPartner"
            }, {
                title: o("copyCode"),
                name: "copy_Code"
            }, {
                title: o("subordinateD"),
                name: "team_port",
                path: "TeamReport"
            }, {
                title: o("commissionDetail"),
                name: "commission",
                path: "MyCommission"
            }, {
                title: o("invitationRules"),
                name: "invite_reg",
                path: "PromotionRule"
            }, {
                title: o("poxyServer"),
                name: "server",
                path: "Server"
            }, {
                title: o("rebateRatio"),
                name: "rebateRatio",
                path: "RebateRatio"
            }].filter(Boolean));
            H(() => {
                X()
            });
            const s = S({
                mylink: "http://55lottery.com/#/register?r_code=5284741404",
                aglink: "MTg5MCY9Jj0mZXlKaFoyVnVkRjlwWkNJNk5ERTBNRFI5Jj0mPSZUWUtQOFg%3d",
                mycode: "",
                children_Lv_1_Count: 0,
                children_Lv_Count_X: 0,
                children_Lv_1_Count_Add: 0,
                children_Lv_Count_X_Add: 0,
                children_Lv_1_Count_Add_Yesterday: 0,
                children_Lv_Count_X_Add_Yesterday: 0,
                children_Lv_RebateAmount_Yesterday: 0,
                children_Lv_1_RebateAmount_Yesterday: 0,
                children_Lv_RebateAmount_Week: 0,
                children_Lv_1_RebateAmount_X_Yesterday: 0,
                children_Lv_RebateAmount: 0
            });

            function Y() {
                var n;
                c.push({
                    name: "PromotionShare",
                    query: {
                        code: (n = s.value) == null ? void 0 : n.mycode
                    }
                })
            }
            const T = n => {
                    var m;
                    n.icon === "copy_code" && P((m = s.value) == null ? void 0 : m.mycode), c.push({
                        name: n.path
                    })
                },
                X = async () => {
                    u.value = !0;
                    try {
                        const n = await oe();
                        n && (s.value = n.data), n.msgCode === 13 && te(n)
                    } catch (n) {
                        throw n
                    } finally {
                        u.value = !1
                    }
                };

            function F() {
                c.push({
                    name: "Subordinate"
                })
            }
            return (n, m) => {
                var y, R, f, b;
                const h = C("svg-icon"),
                    M = C("NavBar"),
                    V = C("van-icon"),
                    G = K("haspermission");
                return r(), _(A, null, [l(M, {
                    class: "white",
                    title: i(o)("titlePromotion")
                }, {
                    right: q(() => [l(h, {
                        name: "subordinate",
                        onClick: F
                    })]),
                    _: 1
                }, 8, ["title"]), s.value ? (r(), k(be, {
                    key: 0,
                    promotion: s.value
                }, null, 8, ["promotion"])) : g("v-if", !0), e("div", Le, [e("div", $e, [e("button", {
                    class: "shareBtn",
                    onClick: Y
                }, t(i(o)("shareInvitationPoster")), 1)]), e("div", Se, [(r(!0), _(A, null, z(D.value, p => {
                    var L;
                    return r(), _("div", {
                        class: "promote__cell-item",
                        onClick: j => T(p)
                    }, [e("div", Ae, [l(h, {
                        name: `${p.name}`
                    }, null, 8, ["name"]), e("span", null, t(p.title), 1)]), e("div", Pe, [p.title === i(o)("copyCode") ? (r(), _("span", {
                        key: 0,
                        onClick: m[0] || (m[0] = j => {
                            var $;
                            return i(P)(($ = s.value) == null ? void 0 : $.mycode)
                        })
                    }, [a(t((L = s.value) == null ? void 0 : L.mycode) + " ", 1), l(h, {
                        name: "copy"
                    })])) : (r(), k(V, {
                        key: 1,
                        name: "arrow",
                        size: "24",
                        color: "var(--text_color_L1)"
                    }))])], 8, ke)
                }), 256))]), E((r(), _("div", Be, [e("div", we, [l(h, {
                    name: "promotionData"
                }), e("span", null, t(i(o)("promotionData")), 1)]), e("div", Ie, [e("div", null, [e("span", null, t((y = s.value) == null ? void 0 : y.children_Lv_RebateAmount_Week), 1), e("span", null, t(i(o)("directGrossCommission")), 1)]), g("因越南代理需求，临时处理下这个问题，周一再统一处理"), Ne, e("div", null, [e("span", null, t((R = s.value) == null ? void 0 : R.children_Lv_RebateAmount), 1), e("span", null, t(i(o)("teamGrossCommission")), 1)])]), e("div", De, [e("div", null, [e("span", null, t((f = s.value) == null ? void 0 : f.children_Lv_1_Count), 1), e("span", null, t(i(o)("directSubordinate")), 1)]), g("因越南代理需求，临时处理下这个问题，周一再统一处理"), Ye, e("div", null, [e("span", null, t((b = s.value) == null ? void 0 : b.children_Lv_Count_X), 1), e("span", null, t(i(o)("totalsubordinates")), 1)])])])), [
                    [G, 20]
                ]), g(" <PromoRank /> ")])], 64)
            }
        }
    });
export {
    Me as _
};