import {
    G as E,
    z as F,
    R as H,
    r as n,
    A as J,
    C as q,
    H as _,
    I as k,
    Q as o,
    J as s,
    an as R,
    au as C,
    O as v,
    N,
    K as W,
    M as X,
    P as l,
    ao as Y,
    ay as Z
} from "./common.modules-af1f85b9.js";
import {
    f as ee,
    d as te,
    A as ae,
    dr as se,
    ds as ne,
    c as oe,
    dt as le,
    _ as re
} from "./page-activity-ActivityDetail-09e806d3.js";
import {
    L as ce
} from "./page-activity-DailySignIn-a76bf4fc.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2c2af617.js";
import "./en-8dc3e88f.js";
import "./page-activity-Bonus-78dc3749.js";
const ie = {
        class: "transRecord__container"
    },
    de = {
        style: {
            height: "65px"
        }
    },
    ue = {
        class: "ar"
    },
    pe = {
        class: "ar-searchbar"
    },
    _e = {
        class: "transRecord__container-content"
    },
    ve = {
        class: "transRecord__container-content__card"
    },
    me = {
        class: "transRecord__container-content__card-top"
    },
    ye = {
        class: "transRecord__container-content__card-mid"
    },
    fe = {
        class: "line"
    },
    he = {
        class: "left"
    },
    ke = {
        class: "right"
    },
    Ce = {
        class: "line"
    },
    Ne = {
        class: "left"
    },
    ge = {
        class: "right"
    },
    we = {
        class: "line"
    },
    Re = {
        class: "left"
    },
    $e = {
        class: "transRecord__container-content__card-bot"
    },
    De = ["value"],
    xe = E({
        __name: "index",
        setup(Le) {
            const {
                t: m
            } = F(), $ = H();

            function D() {
                $.back()
            }
            const r = n([]),
                y = n([]),
                f = n(),
                c = J({
                    date: "",
                    type: -1
                }),
                i = n(!1),
                h = n(""),
                x = n(!1),
                L = async ({
                    selectedOptions: t
                }) => {
                    i.value = !1, h.value = t[0].typeName, c.type = t[0].type, f.value.resetRefresh()
                };

            function S() {
                i.value = !0, x.value = !0
            }
            const {
                key: Se,
                value: T
            } = ee(), d = n(T), {
                minDate: b,
                maxDate: A
            } = te(0), u = n(!1), V = ({
                selectedOptions: t
            }) => {
                u.value = !1
            }, P = async ({
                selectedOptions: t
            }) => {
                u.value = !1, c.date = `${d.value[0]}-${d.value[1]}-${d.value[2]} 00:00:00`, f.value.resetRefresh()
            }, B = ({
                selectedOptions: t
            }) => {}, U = (t, e) => e;
            async function Q() {
                const t = await ae(se());
                t && (r.value = t.data.typeList.map(e => (e.typeName = m(`code${e.typeNameCode}`), e)), r.value.unshift({
                    type: -1,
                    typeName: m("all")
                }), h.value = r.value[0].typeName)
            }
            let z = [8e3, 8005, 8018, 8021, 8023, 8100],
                G = [8001, 8002, 8003, 8004, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 8014, 8015, 8016, 8017, 8019, 8020, 8022, 8024, 8029, 8030, 8031, 8101, 8102, 8103, 8104, 8105, 8107];
            const I = t => {
                y.value = t.map(e => {
                    ["8125"].includes(e.typeNameCode) ? e.typeName = m(`code${e.typeNameCode}`) + " " + e.remark : e.typeName = m(`code${e.typeNameCode}`);
                    let p;
                    return z.includes(e.typeNameCode * 1) ? p = "red" : G.includes(e.typeNameCode * 1) && (p = "green"), { ...e,
                        typeColor: p
                    }
                })
            };

            function M(t) {
                return [109].includes(t) ? "red" : [111, 112, 110, 108, 114].includes(t) ? "green" : ""
            }
            return q(async () => {
                await Q()
            }), (t, e) => {
                const p = _("NavBar"),
                    g = _("ArSelect"),
                    O = _("van-picker"),
                    w = _("van-popup"),
                    K = _("van-date-picker");
                return N(), k("div", ie, [o(p, {
                    title: t.$t("transactionrecord"),
                    "left-arrow": "",
                    onClickLeft: D
                }, null, 8, ["title"]), s("div", de, [s("div", ue, [s("div", pe, [o(g, {
                    onClickSelect: S,
                    selectName: h.value
                }, null, 8, ["selectName"]), o(g, {
                    onClickSelect: e[0] || (e[0] = a => u.value = !0),
                    selectName: c.date || t.$t("pickDate")
                }, null, 8, ["selectName"])])])]), R(" 配合弹窗层使用 "), o(w, {
                    show: i.value,
                    "onUpdate:show": e[2] || (e[2] = a => i.value = a),
                    round: "",
                    position: "bottom"
                }, {
                    default: C(() => [o(O, {
                        "columns-field-names": {
                            text: "typeName",
                            value: "type",
                            children: "children"
                        },
                        columns: r.value,
                        onCancel: e[1] || (e[1] = a => i.value = !1),
                        onConfirm: L
                    }, null, 8, ["columns"])]),
                    _: 1
                }, 8, ["show"]), R(" 日期选择 "), o(w, {
                    show: u.value,
                    "onUpdate:show": e[4] || (e[4] = a => u.value = a),
                    round: "",
                    position: "bottom"
                }, {
                    default: C(() => [o(K, {
                        modelValue: d.value,
                        "onUpdate:modelValue": e[3] || (e[3] = a => d.value = a),
                        title: t.$t("pickDate"),
                        onCancel: V,
                        onConfirm: P,
                        filter: U,
                        onChange: B,
                        "min-date": v(b),
                        "max-date": v(A)
                    }, null, 8, ["modelValue", "title", "min-date", "max-date"])]),
                    _: 1
                }, 8, ["show"]), o(ce, {
                    distance: 100,
                    api: v(le),
                    list: y.value,
                    "onUpdate:list": [e[5] || (e[5] = a => y.value = a), I],
                    ref_key: "listRef",
                    ref: f,
                    pageQuery: c,
                    "onUpdate:pageQuery": e[6] || (e[6] = a => c = a)
                }, {
                    content: C(() => [s("div", _e, [(N(!0), k(W, null, X(y.value, (a, j) => (N(), k("div", {
                        class: "transRecord__container-content__item",
                        key: j
                    }, [s("div", ve, [s("div", me, [s("h3", null, l(a.typeName), 1)]), s("div", ye, [s("div", fe, [s("div", he, l(t.$t("detail")), 1), s("div", ke, l(v(ne)(r.value, a.type)), 1)]), s("div", Ce, [s("div", Ne, l(t.$t("time")), 1), s("div", ge, l(a.addTime), 1)]), s("div", we, [s("div", Re, l(t.$t("amount")), 1), s("div", {
                        class: Y(["right", a.typeColor]),
                        style: Z(`color:${M(a.type)}`)
                    }, l(v(oe)(a.amount)), 7)])]), s("div", $e, [s("textarea", {
                        class: "textarea",
                        name: "remark",
                        cols: "30",
                        rows: "10",
                        readonly: !0,
                        value: [21, 22, 26].includes(a.type) ? "" : a.remark
                    }, null, 8, De)])])]))), 128))])]),
                    _: 1
                }, 8, ["api", "list", "pageQuery"])])
            }
        }
    });
const Qe = re(xe, [
    ["__scopeId", "data-v-2565e76d"],
    ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/wallet/TransAction/index.vue"]
]);
export {
    Qe as
    default
};