"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_libraries_day = require("../../../common/libraries/day.js");
const ME_attendance_my_schedules_model = require("./model.js");
const gen_Enums = require("../../../gen/Enums.js");
const ME_attendance_my_schedules_method = require("./method.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../gen/Apis.js");
require("../../../common/store/useWatermarkStore.js");
require("../../../common/store/useWorkStore.js");
require("../../../common/libraries/apiLoading.js");
if (!Array) {
  const _easycom_hs_empty2 = common_vendor.resolveComponent("hs-empty");
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_u_steps_item2 = common_vendor.resolveComponent("u-steps-item");
  const _easycom_u_steps2 = common_vendor.resolveComponent("u-steps");
  (_easycom_hs_empty2 + _easycom_uni_icons2 + _easycom_u_steps_item2 + _easycom_u_steps2)();
}
const _easycom_hs_empty = () => "../../../components/hs-empty/hs-empty.js";
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_u_steps_item = () => "../../../node-modules/uview-plus/components/u-steps-item/u-steps-item.js";
const _easycom_u_steps = () => "../../../node-modules/uview-plus/components/u-steps/u-steps.js";
if (!Math) {
  (_easycom_hs_empty + _easycom_uni_icons + _easycom_u_steps_item + _easycom_u_steps)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.onShow(() => {
      var _a;
      (_a = ME_attendance_my_schedules_method.method) == null ? void 0 : _a.getList();
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
      return common_vendor.e({
        a: !((_b = (_a = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _a.showData) == null ? void 0 : _b.value)
      }, !((_d = (_c = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _c.showData) == null ? void 0 : _d.value) ? {} : {}, {
        b: common_vendor.f((_h = (_g = (_f = (_e = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _e.showData) == null ? void 0 : _f.value) == null ? void 0 : _g.shift) == null ? void 0 : _h.periods, (i, index, i0) => {
          var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga;
          return common_vendor.e({
            a: common_vendor.t(common_vendor.unref(common_libraries_day.showTime)(`${(_c2 = (_b2 = (_a2 = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _a2.showData) == null ? void 0 : _b2.value) == null ? void 0 : _c2.schedule_date} ${i == null ? void 0 : i.work_start_time}`)),
            b: (_e2 = (_d2 = i == null ? void 0 : i.checkin_status) == null ? void 0 : _d2.start) == null ? void 0 : _e2.checked
          }, ((_g2 = (_f2 = i == null ? void 0 : i.checkin_status) == null ? void 0 : _f2.start) == null ? void 0 : _g2.checked) ? {
            c: common_vendor.t((_j2 = common_vendor.unref(gen_Enums.AttendanceRecordsStatusEnum)[(_i2 = (_h2 = i == null ? void 0 : i.checkin_status) == null ? void 0 : _h2.start) == null ? void 0 : _i2.status]) == null ? void 0 : _j2.text),
            d: common_vendor.n(`status status_${(_l2 = (_k2 = i == null ? void 0 : i.checkin_status) == null ? void 0 : _k2.start) == null ? void 0 : _l2.status}`)
          } : common_vendor.e({
            e: common_vendor.unref(common_libraries_day.isOverHalfHourPast)(`${(_o2 = (_n2 = (_m2 = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _m2.showData) == null ? void 0 : _n2.value) == null ? void 0 : _o2.schedule_date} ${i == null ? void 0 : i.work_start_time}`)
          }, common_vendor.unref(common_libraries_day.isOverHalfHourPast)(`${(_r = (_q = (_p = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _p.showData) == null ? void 0 : _q.value) == null ? void 0 : _r.schedule_date} ${i == null ? void 0 : i.work_start_time}`) ? {} : {}), {
            f: !((_t = (_s = i == null ? void 0 : i.checkin_status) == null ? void 0 : _s.start) == null ? void 0 : _t.checked)
            // &&
            // !isOverHalfHourPast(
            //   `${useModel?.showData?.value?.schedule_date} ${i?.work_start_time}`
            // ) &&
            // isCanCheckIn(
            //   `${useModel?.showData?.value?.schedule_date} ${useModel?.showData?.value?.shift?.allow_checkin_start}`,
            //   `${useModel?.showData?.value?.schedule_date} ${useModel?.showData?.value?.shift?.allow_checkin_end}`
            // )
          }, !((_v = (_u = i == null ? void 0 : i.checkin_status) == null ? void 0 : _u.start) == null ? void 0 : _v.checked) ? {
            g: "5673da8c-3-" + i0 + "," + ("5673da8c-2-" + i0),
            h: common_vendor.p({
              type: "right",
              size: "14",
              color: "#0082FA"
            }),
            i: common_vendor.o(($event) => {
              var _a3;
              return (_a3 = common_vendor.unref(ME_attendance_my_schedules_method.method)) == null ? void 0 : _a3.toDetaile({
                ...i,
                type: "CheckIn"
              });
            }, `periods_${index}`)
          } : {}, {
            j: (_x = (_w = i == null ? void 0 : i.checkin_status) == null ? void 0 : _w.start) == null ? void 0 : _x.time
          }, ((_z = (_y = i == null ? void 0 : i.checkin_status) == null ? void 0 : _y.start) == null ? void 0 : _z.time) ? {
            k: common_vendor.t(common_vendor.unref(common_libraries_day.showTime)((_B = (_A = i == null ? void 0 : i.checkin_status) == null ? void 0 : _A.start) == null ? void 0 : _B.time)),
            l: common_vendor.n(`schedules_steps_check schedules_steps_${(_D = (_C = i == null ? void 0 : i.checkin_status) == null ? void 0 : _C.start) == null ? void 0 : _D.status}`)
          } : {}, {
            m: "5673da8c-2-" + i0 + "," + ("5673da8c-1-" + i0),
            n: common_vendor.t(common_vendor.unref(common_libraries_day.showTime)(`${(_G = (_F = (_E = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _E.showData) == null ? void 0 : _F.value) == null ? void 0 : _G.schedule_date} ${i == null ? void 0 : i.work_end_time}`)),
            o: (_I = (_H = i == null ? void 0 : i.checkin_status) == null ? void 0 : _H.end) == null ? void 0 : _I.checked
          }, ((_K = (_J = i == null ? void 0 : i.checkin_status) == null ? void 0 : _J.end) == null ? void 0 : _K.checked) ? {
            p: common_vendor.t((_N = common_vendor.unref(gen_Enums.AttendanceRecordsStatusEnum)[(_M = (_L = i == null ? void 0 : i.checkin_status) == null ? void 0 : _L.end) == null ? void 0 : _M.status]) == null ? void 0 : _N.text),
            q: common_vendor.n(`status status_${(_P = (_O = i == null ? void 0 : i.checkin_status) == null ? void 0 : _O.end) == null ? void 0 : _P.status}`)
          } : common_vendor.e({
            r: common_vendor.unref(common_libraries_day.isOverHalfHourPast)(`${(_S = (_R = (_Q = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _Q.showData) == null ? void 0 : _R.value) == null ? void 0 : _S.schedule_date} ${i == null ? void 0 : i.work_end_time}`)
          }, common_vendor.unref(common_libraries_day.isOverHalfHourPast)(`${(_V = (_U = (_T = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _T.showData) == null ? void 0 : _U.value) == null ? void 0 : _V.schedule_date} ${i == null ? void 0 : i.work_end_time}`) ? {} : {}), {
            s: !((_X = (_W = i == null ? void 0 : i.checkin_status) == null ? void 0 : _W.end) == null ? void 0 : _X.checked)
            //&&
            // !isOverHalfHourPast(
            //   `${useModel?.showData?.value?.schedule_date} ${i?.work_end_time}`
            // ) &&
            // isCanCheckIn(
            //   `${useModel?.showData?.value?.schedule_date} ${useModel?.showData?.value?.shift?.allow_checkin_start}`,
            //   `${useModel?.showData?.value?.schedule_date} ${useModel?.showData?.value?.shift?.allow_checkin_end}`
            // )
          }, !((_Z = (_Y = i == null ? void 0 : i.checkin_status) == null ? void 0 : _Y.end) == null ? void 0 : _Z.checked) ? {
            t: "5673da8c-5-" + i0 + "," + ("5673da8c-4-" + i0),
            v: common_vendor.p({
              type: "right",
              size: "14",
              color: "#0082FA"
            }),
            w: common_vendor.o(($event) => {
              var _a3;
              return (_a3 = common_vendor.unref(ME_attendance_my_schedules_method.method)) == null ? void 0 : _a3.toDetaile({
                ...i,
                type: "CheckOut"
              });
            }, `periods_${index}`)
          } : {}, {
            x: (_$ = (__ = i == null ? void 0 : i.checkin_status) == null ? void 0 : __.end) == null ? void 0 : _$.time
          }, ((_ba = (_aa = i == null ? void 0 : i.checkin_status) == null ? void 0 : _aa.end) == null ? void 0 : _ba.time) ? {
            y: common_vendor.t(common_vendor.unref(common_libraries_day.showTime)((_da = (_ca = i == null ? void 0 : i.checkin_status) == null ? void 0 : _ca.end) == null ? void 0 : _da.time)),
            z: common_vendor.n(`schedules_steps_check schedules_steps_${(_fa = (_ea = i == null ? void 0 : i.checkin_status) == null ? void 0 : _ea.end) == null ? void 0 : _fa.status}`)
          } : {}, {
            A: "5673da8c-4-" + i0 + "," + ("5673da8c-1-" + i0),
            B: "5673da8c-1-" + i0,
            C: common_vendor.p({
              current: (_ga = common_vendor.unref(ME_attendance_my_schedules_method.method)) == null ? void 0 : _ga.calculationCurrent(i),
              direction: "column",
              activeColor: "#52C41A",
              inactiveColor: "#CBCBCB"
            }),
            D: `periods_${index}`
          });
        }),
        c: common_vendor.t((_l = (_k = (_j = (_i = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _i.showData) == null ? void 0 : _j.value) == null ? void 0 : _k.shift) == null ? void 0 : _l.name),
        d: common_vendor.t(common_vendor.unref(common_libraries_day.getShowDay)((_o = (_n = (_m = common_vendor.unref(ME_attendance_my_schedules_model.useModel)) == null ? void 0 : _m.showData) == null ? void 0 : _n.value) == null ? void 0 : _o.schedule_date))
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/ME/attendance/my_schedules/index.vue"]]);
wx.createPage(MiniProgramPage);
