import {
    G as x,
    R as L,
    r as u,
    A as S,
    w as a,
    a5 as C,
    B as U,
    $,
    H as f,
    I as b,
    Q as d,
    J as s,
    ao as M,
    av as c,
    O as A,
    N as p,
    aB as D,
    P as r,
    au as I,
    K as P,
    M as V
} from "./common.modules-5cfe2cf4.js";
import {
    bY as n,
    cL as Q,
    _ as j
} from "./page-activity-ActivityDetail-a58ec568.js";
import {
    L as q
} from "./page-activity-DailySignIn-543fff66.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2ac88fb8.js";
import "./en-cfd26acf.js";
import "./page-activity-Bonus-3c16c86d.js";
const G = {
        class: "subordinate__container"
    },
    J = {
        class: "subordinate__container-header"
    },
    O = {
        class: "subordinate__container-content"
    },
    T = x({
        __name: "index",
        setup(E) {
            const H = L();

            function k() {
                H.back()
            }
            const g = u(!0),
                Y = u(),
                t = S({
                    startDate: a(n().today.start * 1e3).format("YYYY-MM-DD HH:mm:ss"),
                    endDate: a(n().today.end * 1e3).format("YYYY-MM-DD HH:mm:ss"),
                    level: 1
                });
            let l = C("permission", null);
            l && (l = JSON.parse(l.value));
            const m = u([]),
                B = U(() => l ? l[16] : !0),
                R = new Date,
                y = new Date(R);
            y.setDate(y.getDate() - 1);
            const _ = u(0);
            return $(_, o => {
                switch (o) {
                    case 0:
                        t.startDate = a(n().today.start * 1e3).format("YYYY-MM-DD HH:mm:ss"), t.endDate = a(n().today.end * 1e3).format("YYYY-MM-DD HH:mm:ss");
                        break;
                    case 1:
                        t.startDate = a(n().yesterday.start * 1e3).format("YYYY-MM-DD HH:mm:ss"), t.endDate = a(n().yesterday.end * 1e3).format("YYYY-MM-DD HH:mm:ss");
                        break;
                    case 2:
                        t.startDate = a(n().thisMonth.start * 1e3).format("YYYY-MM-DD HH:mm:ss"), t.endDate = a(n().thisMonth.end * 1e3).format("YYYY-MM-DD HH:mm:ss");
                        break
                }
                Y.value.resetRefresh()
            }), (o, i) => {
                const h = f("NavBar"),
                    v = f("van-tab"),
                    w = f("van-tabs");
                return p(), b("div", G, [d(h, {
                    title: o.$t("addSubor"),
                    "left-arrow": "",
                    onClickLeft: k
                }, null, 8, ["title"]), s("div", J, [M(` <van-tabs class="top-tabBar" v-model:active="topActive" type="card" color="transparent" background="transparent"
				ref="tabsRef" ellipsis>
				<van-tab>
					<template #title> 直属下级 </template>
				</van-tab>
				<van-tab>
					<template #title> 全部下级 </template>
				</van-tab>
			</van-tabs> `), d(w, {
                    class: "footer-tabBar",
                    active: _.value,
                    "onUpdate:active": i[0] || (i[0] = e => _.value = e),
                    type: "card",
                    color: "transparent",
                    background: "transparent",
                    ref: "tabsRef",
                    ellipsis: ""
                }, {
                    default: c(() => [d(v, null, {
                        title: c(() => [D(r(o.$t("code9101")), 1)]),
                        _: 1
                    }), d(v, null, {
                        title: c(() => [D(r(o.$t("code9102")), 1)]),
                        _: 1
                    }), B.value ? (p(), I(v, {
                        key: 0
                    }, {
                        title: c(() => [D(r(o.$t("code9105")), 1)]),
                        _: 1
                    })) : M("v-if", !0)]),
                    _: 1
                }, 8, ["active"])]), d(q, {
                    list: m.value,
                    "onUpdate:list": i[1] || (i[1] = e => m.value = e),
                    "page-query": t,
                    "onUpdate:pageQuery": i[2] || (i[2] = e => t = e),
                    api: A(Q),
                    distance: 100,
                    ref_key: "listRef",
                    ref: Y,
                    "is-auto-load": g.value
                }, {
                    content: c(() => [s("div", O, [(p(!0), b(P, null, V(m.value, (e, N) => (p(), b("div", {
                        class: "subordinate__container-content__item ar-1px-b",
                        key: N
                    }, [s("div", null, [s("span", null, r(e.bindUserName), 1), s("span", null, "UID:" + r(e.bindUserID), 1)]), s("div", null, [s("span", null, r(o.$t("heroDirectSub")), 1), s("span", null, r(e.bindTime), 1)])]))), 128))])]),
                    _: 1
                }, 8, ["list", "page-query", "api", "is-auto-load"])])
            }
        }
    });
const te = j(T, [
    ["__scopeId", "data-v-221aa0df"],
    ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/promotion/Subordinate/index.vue"]
]);
export {
    te as
    default
};