import {
    G as P,
    H as g,
    I as c,
    J as e,
    P as t,
    Q as l,
    aA as a,
    N as r,
    z as J,
    R as U,
    r as S,
    B as W,
    C as z,
    az as H,
    au as K,
    O as i,
    at as k,
    an as C,
    K as A,
    M as q,
    aw as E,
    aB as O,
    aC as Q
} from "./common.modules-af1f85b9.js";
import {
    _ as Z,
    G as x,
    y as ee,
    cs as oe,
    h as te,
    L as B
} from "./page-activity-ActivityDetail-f7c58355.js";
import {
    u as ne
} from "./page-promotion-TeamReport-9261ab80.js";
const se = {
        class: "container"
    },
    ae = {
        class: "amount"
    },
    ie = {
        class: "amount_txt"
    },
    re = {
        class: "tip"
    },
    le = {
        class: "info_content"
    },
    _e = {
        class: "info"
    },
    ce = {
        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"
    },
    Ce = {
        class: "line1"
    },
    ge = {
        class: "line2"
    },
    ye = {
        class: "line3"
    },
    fe = {
        class: "line1"
    },
    Re = P({
        __name: "index",
        props: {
            promotion: {
                type: null,
                required: !0
            }
        },
        setup(d) {
            return (o, I) => {
                var _, u;
                const v = g("svg-icon");
                return r(), c("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", _e, [e("div", ce, [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((_ = o.promotion) == null ? void 0 : _.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", Ce, [e("div", null, t(o.promotion.children_Lv_Count_X_Add_Yesterday), 1), a(" " + t(o.$t("registernum")), 1)]), e("div", ge, [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", fe, [e("div", null, t((u = o.promotion) == null ? void 0 : u.children_Lv_FirstRechargesCount), 1), a(" " + t(o.$t("firstRechargesC")), 1)])])])])
            }
        }
    });
const be = Z(Re, [
        ["__scopeId", "data-v-6cf5705a"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar031-india-in999/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"
    },
    Be = {
        class: "arrow"
    },
    Pe = {
        class: "commission"
    },
    we = {
        class: "commission__title"
    },
    Ie = {
        class: "commission__body"
    },
    Ne = w(() => e("span", null, null, -1)),
    Ye = {
        class: "commission__body"
    },
    De = w(() => e("span", null, null, -1)),
    Me = P({
        __name: "index",
        setup(d) {
            ne(["TeamReport"]);
            const {
                t: o
            } = J(), v = x().getUserInfo, _ = U(), u = S(!1), N = ee(), Y = 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));
            z(() => {
                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 D() {
                var n;
                _.push({
                    name: "PromotionShare",
                    query: {
                        code: (n = s.value) == null ? void 0 : n.mycode
                    }
                })
            }
            const T = n => {
                    var m;
                    n.icon === "copy_code" && B((m = s.value) == null ? void 0 : m.mycode), _.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() {
                _.push({
                    name: "Subordinate"
                })
            }
            return (n, m) => {
                var y, f, R, b;
                const h = g("svg-icon"),
                    M = g("NavBar"),
                    V = g("van-icon"),
                    G = H("haspermission");
                return r(), c(A, null, [l(M, {
                    class: "white",
                    title: i(o)("titlePromotion")
                }, {
                    right: K(() => [l(h, {
                        name: "subordinate",
                        onClick: F
                    })]),
                    _: 1
                }, 8, ["title"]), s.value ? (r(), k(be, {
                    key: 0,
                    promotion: s.value
                }, null, 8, ["promotion"])) : C("v-if", !0), e("div", Le, [e("div", $e, [e("button", {
                    class: "shareBtn",
                    onClick: D
                }, t(i(o)("shareInvitationPoster")), 1)]), e("div", Se, [(r(!0), c(A, null, q(Y.value, p => {
                    var L;
                    return r(), c("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", Be, [p.title === i(o)("copyCode") ? (r(), c("span", {
                        key: 0,
                        onClick: m[0] || (m[0] = j => {
                            var $;
                            return i(B)(($ = 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(), c("div", Pe, [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)]), C("因越南代理需求，临时处理下这个问题，周一再统一处理"), Ne, e("div", null, [e("span", null, t((f = s.value) == null ? void 0 : f.children_Lv_RebateAmount), 1), e("span", null, t(i(o)("teamGrossCommission")), 1)])]), e("div", Ye, [e("div", null, [e("span", null, t((R = s.value) == null ? void 0 : R.children_Lv_1_Count), 1), e("span", null, t(i(o)("directSubordinate")), 1)]), C("因越南代理需求，临时处理下这个问题，周一再统一处理"), De, 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]
                ]), C(" <PromoRank /> ")])], 64)
            }
        }
    });
export {
    Me as _
};