import { defineComponent, unref, mergeProps, withCtx, createVNode, createTextVNode, toDisplayString, createBlock, openBlock, Fragment, renderList, useSSRContext, renderSlot, ref, computed, watch, onMounted, createCommentVNode, withDirectives, vModelText } from "vue";
import { ssrRenderComponent, ssrRenderList, ssrInterpolate, ssrRenderSlot, ssrRenderClass, ssrRenderAttr } from "vue/server-renderer";
import { usePage, Head, Link, router } from "@inertiajs/vue3";
import { _ as _sfc_main$p } from "./AppLayout-DXKl-uoF.js";
import { _ as _sfc_main$q } from "./Sonner-DWWNv2jt.js";
import { toast } from "vue-sonner";
/* empty css               */
import { reactiveOmit } from "@vueuse/core";
import { useForwardPropsEmits, CalendarRoot, useForwardProps, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrev, PopoverRoot, PopoverAnchor, PopoverPortal, PopoverContent, PopoverTrigger, PaginationRoot, PaginationList, PaginationEllipsis, PaginationFirst, PaginationListItem, PaginationLast, PaginationNext, PaginationPrev } from "reka-ui";
import { c as cn, b as buttonVariants, _ as _sfc_main$y } from "./AppLogoIcon-DhmQfNIw.js";
import { ChevronRight, ChevronLeft, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, CalendarIcon } from "lucide-vue-next";
import { _ as _sfc_main$r } from "./Input-CFG4Vy8n.js";
import { format } from "date-fns";
import { _ as _sfc_main$s, a as _sfc_main$t, b as _sfc_main$u, c as _sfc_main$v, d as _sfc_main$w, f as _sfc_main$x } from "./SelectValue-Bls_QTA2.js";
import { _ as _sfc_main$z, a as _sfc_main$A, b as _sfc_main$B } from "./DialogTrigger-f2i9l7Ew.js";
import "class-variance-authority";
import "clsx";
import "tailwind-merge";
const _sfc_main$o = /* @__PURE__ */ defineComponent({
  __name: "Calendar",
  __ssrInlineRender: true,
  props: {
    defaultValue: {},
    defaultPlaceholder: {},
    placeholder: {},
    pagedNavigation: { type: Boolean },
    preventDeselect: { type: Boolean },
    weekStartsOn: {},
    weekdayFormat: {},
    calendarLabel: {},
    fixedWeeks: { type: Boolean },
    maxValue: {},
    minValue: {},
    locale: {},
    numberOfMonths: {},
    disabled: { type: Boolean },
    readonly: { type: Boolean },
    initialFocus: { type: Boolean },
    isDateDisabled: { type: Function },
    isDateUnavailable: { type: Function },
    dir: {},
    nextPage: { type: Function },
    prevPage: { type: Function },
    modelValue: {},
    multiple: { type: Boolean },
    disableDaysOutsideCurrentView: { type: Boolean },
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  emits: ["update:modelValue", "update:placeholder"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const delegatedProps = reactiveOmit(props, "class");
    const forwarded = useForwardPropsEmits(delegatedProps, emits);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarRoot), mergeProps({
        "data-slot": "calendar",
        class: unref(cn)("p-3", props.class)
      }, unref(forwarded), _attrs), {
        default: withCtx(({ grid, weekDays }, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(unref(_sfc_main$g), null, {
              default: withCtx((_, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(unref(_sfc_main$f), null, null, _parent3, _scopeId2));
                  _push3(`<div class="flex items-center gap-1"${_scopeId2}>`);
                  _push3(ssrRenderComponent(unref(_sfc_main$d), null, null, _parent3, _scopeId2));
                  _push3(ssrRenderComponent(unref(_sfc_main$e), null, null, _parent3, _scopeId2));
                  _push3(`</div>`);
                } else {
                  return [
                    createVNode(unref(_sfc_main$f)),
                    createVNode("div", { class: "flex items-center gap-1" }, [
                      createVNode(unref(_sfc_main$d)),
                      createVNode(unref(_sfc_main$e))
                    ])
                  ];
                }
              }),
              _: 2
            }, _parent2, _scopeId));
            _push2(`<div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"${_scopeId}><!--[-->`);
            ssrRenderList(grid, (month) => {
              _push2(ssrRenderComponent(unref(_sfc_main$l), {
                key: month.value.toString()
              }, {
                default: withCtx((_, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$j), null, {
                      default: withCtx((_2, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$i), null, {
                            default: withCtx((_3, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(`<!--[-->`);
                                ssrRenderList(weekDays, (day) => {
                                  _push5(ssrRenderComponent(unref(_sfc_main$h), { key: day }, {
                                    default: withCtx((_4, _push6, _parent6, _scopeId5) => {
                                      if (_push6) {
                                        _push6(`${ssrInterpolate(day)}`);
                                      } else {
                                        return [
                                          createTextVNode(toDisplayString(day), 1)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                });
                                _push5(`<!--]-->`);
                              } else {
                                return [
                                  (openBlock(true), createBlock(Fragment, null, renderList(weekDays, (day) => {
                                    return openBlock(), createBlock(unref(_sfc_main$h), { key: day }, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(day), 1)
                                      ]),
                                      _: 2
                                    }, 1024);
                                  }), 128))
                                ];
                              }
                            }),
                            _: 2
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$i), null, {
                              default: withCtx(() => [
                                (openBlock(true), createBlock(Fragment, null, renderList(weekDays, (day) => {
                                  return openBlock(), createBlock(unref(_sfc_main$h), { key: day }, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(day), 1)
                                    ]),
                                    _: 2
                                  }, 1024);
                                }), 128))
                              ]),
                              _: 2
                            }, 1024)
                          ];
                        }
                      }),
                      _: 2
                    }, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(unref(_sfc_main$k), null, {
                      default: withCtx((_2, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(`<!--[-->`);
                          ssrRenderList(month.rows, (weekDates, index) => {
                            _push4(ssrRenderComponent(unref(_sfc_main$i), {
                              key: `weekDate-${index}`,
                              class: "mt-2 w-full"
                            }, {
                              default: withCtx((_3, _push5, _parent5, _scopeId4) => {
                                if (_push5) {
                                  _push5(`<!--[-->`);
                                  ssrRenderList(weekDates, (weekDate) => {
                                    _push5(ssrRenderComponent(unref(_sfc_main$n), {
                                      key: weekDate.toString(),
                                      date: weekDate
                                    }, {
                                      default: withCtx((_4, _push6, _parent6, _scopeId5) => {
                                        if (_push6) {
                                          _push6(ssrRenderComponent(unref(_sfc_main$m), {
                                            day: weekDate,
                                            month: month.value
                                          }, null, _parent6, _scopeId5));
                                        } else {
                                          return [
                                            createVNode(unref(_sfc_main$m), {
                                              day: weekDate,
                                              month: month.value
                                            }, null, 8, ["day", "month"])
                                          ];
                                        }
                                      }),
                                      _: 2
                                    }, _parent5, _scopeId4));
                                  });
                                  _push5(`<!--]-->`);
                                } else {
                                  return [
                                    (openBlock(true), createBlock(Fragment, null, renderList(weekDates, (weekDate) => {
                                      return openBlock(), createBlock(unref(_sfc_main$n), {
                                        key: weekDate.toString(),
                                        date: weekDate
                                      }, {
                                        default: withCtx(() => [
                                          createVNode(unref(_sfc_main$m), {
                                            day: weekDate,
                                            month: month.value
                                          }, null, 8, ["day", "month"])
                                        ]),
                                        _: 2
                                      }, 1032, ["date"]);
                                    }), 128))
                                  ];
                                }
                              }),
                              _: 2
                            }, _parent4, _scopeId3));
                          });
                          _push4(`<!--]-->`);
                        } else {
                          return [
                            (openBlock(true), createBlock(Fragment, null, renderList(month.rows, (weekDates, index) => {
                              return openBlock(), createBlock(unref(_sfc_main$i), {
                                key: `weekDate-${index}`,
                                class: "mt-2 w-full"
                              }, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(weekDates, (weekDate) => {
                                    return openBlock(), createBlock(unref(_sfc_main$n), {
                                      key: weekDate.toString(),
                                      date: weekDate
                                    }, {
                                      default: withCtx(() => [
                                        createVNode(unref(_sfc_main$m), {
                                          day: weekDate,
                                          month: month.value
                                        }, null, 8, ["day", "month"])
                                      ]),
                                      _: 2
                                    }, 1032, ["date"]);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024);
                            }), 128))
                          ];
                        }
                      }),
                      _: 2
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$j), null, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$i), null, {
                            default: withCtx(() => [
                              (openBlock(true), createBlock(Fragment, null, renderList(weekDays, (day) => {
                                return openBlock(), createBlock(unref(_sfc_main$h), { key: day }, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(day), 1)
                                  ]),
                                  _: 2
                                }, 1024);
                              }), 128))
                            ]),
                            _: 2
                          }, 1024)
                        ]),
                        _: 2
                      }, 1024),
                      createVNode(unref(_sfc_main$k), null, {
                        default: withCtx(() => [
                          (openBlock(true), createBlock(Fragment, null, renderList(month.rows, (weekDates, index) => {
                            return openBlock(), createBlock(unref(_sfc_main$i), {
                              key: `weekDate-${index}`,
                              class: "mt-2 w-full"
                            }, {
                              default: withCtx(() => [
                                (openBlock(true), createBlock(Fragment, null, renderList(weekDates, (weekDate) => {
                                  return openBlock(), createBlock(unref(_sfc_main$n), {
                                    key: weekDate.toString(),
                                    date: weekDate
                                  }, {
                                    default: withCtx(() => [
                                      createVNode(unref(_sfc_main$m), {
                                        day: weekDate,
                                        month: month.value
                                      }, null, 8, ["day", "month"])
                                    ]),
                                    _: 2
                                  }, 1032, ["date"]);
                                }), 128))
                              ]),
                              _: 2
                            }, 1024);
                          }), 128))
                        ]),
                        _: 2
                      }, 1024)
                    ];
                  }
                }),
                _: 2
              }, _parent2, _scopeId));
            });
            _push2(`<!--]--></div>`);
          } else {
            return [
              createVNode(unref(_sfc_main$g), null, {
                default: withCtx(() => [
                  createVNode(unref(_sfc_main$f)),
                  createVNode("div", { class: "flex items-center gap-1" }, [
                    createVNode(unref(_sfc_main$d)),
                    createVNode(unref(_sfc_main$e))
                  ])
                ]),
                _: 1
              }),
              createVNode("div", { class: "flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0" }, [
                (openBlock(true), createBlock(Fragment, null, renderList(grid, (month) => {
                  return openBlock(), createBlock(unref(_sfc_main$l), {
                    key: month.value.toString()
                  }, {
                    default: withCtx(() => [
                      createVNode(unref(_sfc_main$j), null, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$i), null, {
                            default: withCtx(() => [
                              (openBlock(true), createBlock(Fragment, null, renderList(weekDays, (day) => {
                                return openBlock(), createBlock(unref(_sfc_main$h), { key: day }, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(day), 1)
                                  ]),
                                  _: 2
                                }, 1024);
                              }), 128))
                            ]),
                            _: 2
                          }, 1024)
                        ]),
                        _: 2
                      }, 1024),
                      createVNode(unref(_sfc_main$k), null, {
                        default: withCtx(() => [
                          (openBlock(true), createBlock(Fragment, null, renderList(month.rows, (weekDates, index) => {
                            return openBlock(), createBlock(unref(_sfc_main$i), {
                              key: `weekDate-${index}`,
                              class: "mt-2 w-full"
                            }, {
                              default: withCtx(() => [
                                (openBlock(true), createBlock(Fragment, null, renderList(weekDates, (weekDate) => {
                                  return openBlock(), createBlock(unref(_sfc_main$n), {
                                    key: weekDate.toString(),
                                    date: weekDate
                                  }, {
                                    default: withCtx(() => [
                                      createVNode(unref(_sfc_main$m), {
                                        day: weekDate,
                                        month: month.value
                                      }, null, 8, ["day", "month"])
                                    ]),
                                    _: 2
                                  }, 1032, ["date"]);
                                }), 128))
                              ]),
                              _: 2
                            }, 1024);
                          }), 128))
                        ]),
                        _: 2
                      }, 1024)
                    ]),
                    _: 2
                  }, 1024);
                }), 128))
              ])
            ];
          }
        }),
        _: 1
      }, _parent));
    };
  }
});
const _sfc_setup$o = _sfc_main$o.setup;
_sfc_main$o.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/Calendar.vue");
  return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0;
};
const _sfc_main$n = /* @__PURE__ */ defineComponent({
  __name: "CalendarCell",
  __ssrInlineRender: true,
  props: {
    date: {},
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarCell), mergeProps({
        "data-slot": "calendar-cell",
        class: unref(cn)("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:rounded-md [&:has([data-selected])]:bg-accent", props.class)
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$n = _sfc_main$n.setup;
_sfc_main$n.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarCell.vue");
  return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
};
const _sfc_main$m = /* @__PURE__ */ defineComponent({
  __name: "CalendarCellTrigger",
  __ssrInlineRender: true,
  props: {
    day: {},
    month: {},
    asChild: { type: Boolean },
    as: { type: [String, Object, Function], default: "button" },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarCellTrigger), mergeProps({
        "data-slot": "calendar-cell-trigger",
        class: unref(cn)(
          unref(buttonVariants)({ variant: "ghost" }),
          "size-8 p-0 font-normal aria-selected:opacity-100 cursor-default",
          "[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
          // Selected
          "data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:opacity-100 data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground",
          // Disabled
          "data-[disabled]:text-muted-foreground data-[disabled]:opacity-50",
          // Unavailable
          "data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through",
          // Outside months
          "data-[outside-view]:text-muted-foreground",
          props.class
        )
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$m = _sfc_main$m.setup;
_sfc_main$m.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarCellTrigger.vue");
  return _sfc_setup$m ? _sfc_setup$m(props, ctx) : void 0;
};
const _sfc_main$l = /* @__PURE__ */ defineComponent({
  __name: "CalendarGrid",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarGrid), mergeProps({
        "data-slot": "calendar-grid",
        class: unref(cn)("w-full border-collapse space-x-1", props.class)
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$l = _sfc_main$l.setup;
_sfc_main$l.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarGrid.vue");
  return _sfc_setup$l ? _sfc_setup$l(props, ctx) : void 0;
};
const _sfc_main$k = /* @__PURE__ */ defineComponent({
  __name: "CalendarGridBody",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] }
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarGridBody), mergeProps({ "data-slot": "calendar-grid-body" }, props, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$k = _sfc_main$k.setup;
_sfc_main$k.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarGridBody.vue");
  return _sfc_setup$k ? _sfc_setup$k(props, ctx) : void 0;
};
const _sfc_main$j = /* @__PURE__ */ defineComponent({
  __name: "CalendarGridHead",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarGridHead), mergeProps({ "data-slot": "calendar-grid-head" }, props, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$j = _sfc_main$j.setup;
_sfc_main$j.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarGridHead.vue");
  return _sfc_setup$j ? _sfc_setup$j(props, ctx) : void 0;
};
const _sfc_main$i = /* @__PURE__ */ defineComponent({
  __name: "CalendarGridRow",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarGridRow), mergeProps({
        "data-slot": "calendar-grid-row",
        class: unref(cn)("flex", props.class)
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$i = _sfc_main$i.setup;
_sfc_main$i.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarGridRow.vue");
  return _sfc_setup$i ? _sfc_setup$i(props, ctx) : void 0;
};
const _sfc_main$h = /* @__PURE__ */ defineComponent({
  __name: "CalendarHeadCell",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarHeadCell), mergeProps({
        "data-slot": "calendar-head-cell",
        class: unref(cn)("text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]", props.class)
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$h = _sfc_main$h.setup;
_sfc_main$h.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarHeadCell.vue");
  return _sfc_setup$h ? _sfc_setup$h(props, ctx) : void 0;
};
const _sfc_main$g = /* @__PURE__ */ defineComponent({
  __name: "CalendarHeader",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarHeader), mergeProps({
        "data-slot": "calendar-header",
        class: unref(cn)("flex justify-center pt-1 relative items-center w-full", props.class)
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$g = _sfc_main$g.setup;
_sfc_main$g.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarHeader.vue");
  return _sfc_setup$g ? _sfc_setup$g(props, ctx) : void 0;
};
const _sfc_main$f = /* @__PURE__ */ defineComponent({
  __name: "CalendarHeading",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarHeading), mergeProps({
        "data-slot": "calendar-heading",
        class: unref(cn)("text-sm font-medium", props.class)
      }, unref(forwardedProps), _attrs), {
        default: withCtx(({ headingValue }, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", { headingValue }, () => {
              _push2(`${ssrInterpolate(headingValue)}`);
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", { headingValue }, () => [
                createTextVNode(toDisplayString(headingValue), 1)
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$f = _sfc_main$f.setup;
_sfc_main$f.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarHeading.vue");
  return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0;
};
const _sfc_main$e = /* @__PURE__ */ defineComponent({
  __name: "CalendarNextButton",
  __ssrInlineRender: true,
  props: {
    nextPage: { type: Function },
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarNext), mergeProps({
        "data-slot": "calendar-next-button",
        class: unref(cn)(
          unref(buttonVariants)({ variant: "outline" }),
          "absolute right-1",
          "size-7 bg-transparent p-0 opacity-50 hover:opacity-100",
          props.class
        )
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(ssrRenderComponent(unref(ChevronRight), { class: "size-4" }, null, _parent2, _scopeId));
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode(unref(ChevronRight), { class: "size-4" })
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$e = _sfc_main$e.setup;
_sfc_main$e.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarNextButton.vue");
  return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0;
};
const _sfc_main$d = /* @__PURE__ */ defineComponent({
  __name: "CalendarPrevButton",
  __ssrInlineRender: true,
  props: {
    prevPage: { type: Function },
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    const forwardedProps = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(CalendarPrev), mergeProps({
        "data-slot": "calendar-prev-button",
        class: unref(cn)(
          unref(buttonVariants)({ variant: "outline" }),
          "absolute left-1",
          "size-7 bg-transparent p-0 opacity-50 hover:opacity-100",
          props.class
        )
      }, unref(forwardedProps), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(ssrRenderComponent(unref(ChevronLeft), { class: "size-4" }, null, _parent2, _scopeId));
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode(unref(ChevronLeft), { class: "size-4" })
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$d = _sfc_main$d.setup;
_sfc_main$d.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/calendar/CalendarPrevButton.vue");
  return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
};
const _sfc_main$c = /* @__PURE__ */ defineComponent({
  __name: "Popover",
  __ssrInlineRender: true,
  props: {
    defaultOpen: { type: Boolean },
    open: { type: Boolean },
    modal: { type: Boolean }
  },
  emits: ["update:open"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const forwarded = useForwardPropsEmits(props, emits);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PopoverRoot), mergeProps({ "data-slot": "popover" }, unref(forwarded), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$c = _sfc_main$c.setup;
_sfc_main$c.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/popover/Popover.vue");
  return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
};
const _sfc_main$b = /* @__PURE__ */ defineComponent({
  __name: "PopoverAnchor",
  __ssrInlineRender: true,
  props: {
    reference: {},
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] }
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PopoverAnchor), mergeProps({ "data-slot": "popover-anchor" }, props, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$b = _sfc_main$b.setup;
_sfc_main$b.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/popover/PopoverAnchor.vue");
  return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
};
const _sfc_main$a = /* @__PURE__ */ defineComponent({
  ...{
    inheritAttrs: false
  },
  __name: "PopoverContent",
  __ssrInlineRender: true,
  props: {
    forceMount: { type: Boolean },
    side: {},
    sideOffset: { default: 4 },
    sideFlip: { type: Boolean },
    align: { default: "center" },
    alignOffset: {},
    alignFlip: { type: Boolean },
    avoidCollisions: { type: Boolean },
    collisionBoundary: {},
    collisionPadding: {},
    arrowPadding: {},
    sticky: {},
    hideWhenDetached: { type: Boolean },
    positionStrategy: {},
    updatePositionStrategy: {},
    disableUpdateOnLayoutShift: { type: Boolean },
    prioritizePosition: { type: Boolean },
    reference: {},
    asChild: { type: Boolean },
    as: {},
    disableOutsidePointerEvents: { type: Boolean },
    class: {}
  },
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const delegatedProps = reactiveOmit(props, "class");
    const forwarded = useForwardPropsEmits(delegatedProps, emits);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PopoverPortal), _attrs, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(unref(PopoverContent), mergeProps({ "data-slot": "popover-content" }, { ...unref(forwarded), ..._ctx.$attrs }, {
              class: unref(cn)(
                "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",
                props.class
              )
            }), {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push3, _parent3, _scopeId2);
                } else {
                  return [
                    renderSlot(_ctx.$slots, "default")
                  ];
                }
              }),
              _: 3
            }, _parent2, _scopeId));
          } else {
            return [
              createVNode(unref(PopoverContent), mergeProps({ "data-slot": "popover-content" }, { ...unref(forwarded), ..._ctx.$attrs }, {
                class: unref(cn)(
                  "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",
                  props.class
                )
              }), {
                default: withCtx(() => [
                  renderSlot(_ctx.$slots, "default")
                ]),
                _: 3
              }, 16, ["class"])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$a = _sfc_main$a.setup;
_sfc_main$a.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/popover/PopoverContent.vue");
  return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
};
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
  __name: "PopoverTrigger",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] }
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PopoverTrigger), mergeProps({ "data-slot": "popover-trigger" }, props, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$9 = _sfc_main$9.setup;
_sfc_main$9.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/popover/PopoverTrigger.vue");
  return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
};
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
  __name: "Pagination",
  __ssrInlineRender: true,
  props: {
    page: {},
    defaultPage: {},
    itemsPerPage: {},
    total: {},
    siblingCount: {},
    disabled: { type: Boolean },
    showEdges: { type: Boolean },
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  emits: ["update:page"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const delegatedProps = reactiveOmit(props, "class");
    const forwarded = useForwardPropsEmits(delegatedProps, emits);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationRoot), mergeProps({ "data-slot": "pagination" }, unref(forwarded), {
        class: unref(cn)("mx-auto flex w-full justify-center", props.class)
      }, _attrs), {
        default: withCtx((slotProps, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", slotProps, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", slotProps)
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$8 = _sfc_main$8.setup;
_sfc_main$8.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/Pagination.vue");
  return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
};
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
  __name: "PaginationContent",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationList), mergeProps({ "data-slot": "pagination-content" }, unref(delegatedProps), {
        class: unref(cn)("flex flex-row items-center gap-1", props.class)
      }, _attrs), {
        default: withCtx((slotProps, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", slotProps, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", slotProps)
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$7 = _sfc_main$7.setup;
_sfc_main$7.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationContent.vue");
  return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
};
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
  __name: "PaginationEllipsis",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: { type: [String, Object, Function] },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationEllipsis), mergeProps({ "data-slot": "pagination-ellipsis" }, unref(delegatedProps), {
        class: unref(cn)("flex size-9 items-center justify-center", props.class)
      }, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(ssrRenderComponent(unref(MoreHorizontal), { class: "size-4" }, null, _parent2, _scopeId));
              _push2(`<span class="sr-only"${_scopeId}>More pages</span>`);
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode(unref(MoreHorizontal), { class: "size-4" }),
                createVNode("span", { class: "sr-only" }, "More pages")
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$6 = _sfc_main$6.setup;
_sfc_main$6.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationEllipsis.vue");
  return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
};
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
  __name: "PaginationFirst",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: {},
    size: { default: "default" },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class", "size");
    const forwarded = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationFirst), mergeProps({
        "data-slot": "pagination-first",
        class: unref(cn)(unref(buttonVariants)({ variant: "ghost", size: _ctx.size }), "gap-1 px-2.5 sm:pr-2.5", props.class)
      }, unref(forwarded), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(ssrRenderComponent(unref(ChevronLeftIcon), null, null, _parent2, _scopeId));
              _push2(`<span class="hidden sm:block"${_scopeId}>First</span>`);
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode(unref(ChevronLeftIcon)),
                createVNode("span", { class: "hidden sm:block" }, "First")
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$5 = _sfc_main$5.setup;
_sfc_main$5.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationFirst.vue");
  return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
};
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
  __name: "PaginationItem",
  __ssrInlineRender: true,
  props: {
    value: {},
    asChild: { type: Boolean },
    as: {},
    size: { default: "icon" },
    class: {},
    isActive: { type: Boolean }
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class", "size", "isActive");
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationListItem), mergeProps({ "data-slot": "pagination-item" }, unref(delegatedProps), {
        class: unref(cn)(
          unref(buttonVariants)({
            variant: _ctx.isActive ? "outline" : "ghost",
            size: _ctx.size
          }),
          props.class
        )
      }, _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default")
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$4 = _sfc_main$4.setup;
_sfc_main$4.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationItem.vue");
  return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
};
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
  __name: "PaginationLast",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: {},
    size: { default: "default" },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class", "size");
    const forwarded = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationLast), mergeProps({
        "data-slot": "pagination-last",
        class: unref(cn)(unref(buttonVariants)({ variant: "ghost", size: _ctx.size }), "gap-1 px-2.5 sm:pr-2.5", props.class)
      }, unref(forwarded), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(`<span class="hidden sm:block"${_scopeId}>Last</span>`);
              _push2(ssrRenderComponent(unref(ChevronRightIcon), null, null, _parent2, _scopeId));
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode("span", { class: "hidden sm:block" }, "Last"),
                createVNode(unref(ChevronRightIcon))
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$3 = _sfc_main$3.setup;
_sfc_main$3.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationLast.vue");
  return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
};
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
  __name: "PaginationNext",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: {},
    size: { default: "default" },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class", "size");
    const forwarded = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationNext), mergeProps({
        "data-slot": "pagination-next",
        class: unref(cn)(unref(buttonVariants)({ variant: "ghost", size: _ctx.size }), "gap-1 px-2.5 sm:pr-2.5", props.class)
      }, unref(forwarded), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(`<span class="hidden sm:block"${_scopeId}>Next</span>`);
              _push2(ssrRenderComponent(unref(ChevronRightIcon), null, null, _parent2, _scopeId));
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode("span", { class: "hidden sm:block" }, "Next"),
                createVNode(unref(ChevronRightIcon))
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$2 = _sfc_main$2.setup;
_sfc_main$2.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationNext.vue");
  return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
};
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
  __name: "PaginationPrevious",
  __ssrInlineRender: true,
  props: {
    asChild: { type: Boolean },
    as: {},
    size: { default: "default" },
    class: {}
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class", "size");
    const forwarded = useForwardProps(delegatedProps);
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(unref(PaginationPrev), mergeProps({
        "data-slot": "pagination-previous",
        class: unref(cn)(unref(buttonVariants)({ variant: "ghost", size: _ctx.size }), "gap-1 px-2.5 sm:pr-2.5", props.class)
      }, unref(forwarded), _attrs), {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            ssrRenderSlot(_ctx.$slots, "default", {}, () => {
              _push2(ssrRenderComponent(unref(ChevronLeftIcon), null, null, _parent2, _scopeId));
              _push2(`<span class="hidden sm:block"${_scopeId}>Previous</span>`);
            }, _push2, _parent2, _scopeId);
          } else {
            return [
              renderSlot(_ctx.$slots, "default", {}, () => [
                createVNode(unref(ChevronLeftIcon)),
                createVNode("span", { class: "hidden sm:block" }, "Previous")
              ])
            ];
          }
        }),
        _: 3
      }, _parent));
    };
  }
});
const _sfc_setup$1 = _sfc_main$1.setup;
_sfc_main$1.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/components/ui/pagination/PaginationPrevious.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "Index",
  __ssrInlineRender: true,
  props: ["requests", "filters", "installers"],
  setup(__props) {
    const loading = ref(false);
    const selectedImage = ref("");
    const showImageModal = ref(false);
    const breadcrumbs = [{ title: "Заявки", href: "/requests" }];
    const props = __props;
    const user = usePage().props.auth.user;
    const requests = computed(() => props.requests.data);
    computed(() => user.role === "admin");
    computed(() => user.role === "engineer");
    computed(() => user.role === "installer");
    const commentInputs = ref({});
    const priceInputs = ref({});
    const filterAddress = ref(props.filters.address || "");
    const filterStatus = ref(props.filters.status || "");
    const filterInstallerId = ref(props.filters.installer_id || "");
    const filterDateFrom = ref(props.filters.date_from ? new Date(props.filters.date_from) : null);
    const filterDateTo = ref(props.filters.date_to ? new Date(props.filters.date_to) : null);
    function applyFilters(overrides = {}) {
      loading.value = true;
      router.get("/requests", {
        status: filterStatus.value || void 0,
        installer_id: filterInstallerId.value || void 0,
        date_from: formatDateForAPI(filterDateFrom.value) || void 0,
        date_to: formatDateForAPI(filterDateTo.value) || void 0,
        address: filterAddress.value || void 0,
        ...overrides
      }, {
        preserveState: true,
        preserveScroll: true,
        replace: true,
        onFinish: () => {
          loading.value = false;
        }
      });
    }
    watch([filterStatus, filterInstallerId, filterDateFrom, filterDateTo, filterAddress], applyFilters, { deep: true });
    function goToPage(page) {
      if (page === props.requests.current_page) return;
      if (page < 1 || page > props.requests.last_page) return;
      applyFilters({ page });
    }
    function resetFilters() {
      filterStatus.value = "";
      filterInstallerId.value = "";
      filterDateFrom.value = null;
      filterDateTo.value = null;
      filterAddress.value = "";
    }
    function takeRequest(id) {
      if (confirm("Взять заявку в работу?")) {
        router.post(`/requests/${id}/assign`, {}, {
          preserveScroll: true,
          replace: true,
          onSuccess: () => {
            const r = requests.value.find((r2) => r2.id === id);
            if (r) {
              r.status = "assigned";
              r.assigned_to = user.id;
            }
            toast.success(`Вы взяли в работу заявку #${id}`);
          },
          onError: () => toast.error("Не удалось взять заявку в работу")
        });
      }
    }
    function completeRequest(id) {
      const note = commentInputs.value[id] || "";
      const installation_price = priceInputs.value[id] || null;
      router.post(`/requests/${id}/complete`, { note, installation_price }, {
        preserveScroll: true,
        onSuccess: () => {
          const r = requests.value.find((r2) => r2.id === id);
          if (r) r.status = "done";
          commentInputs.value[id] = "";
          priceInputs.value[id] = "";
          toast.success(`Вы завершили заявку #${id}`);
        },
        onError: () => toast.error("Ошибка при завершении заявки")
      });
    }
    function deleteRequest(id) {
      if (confirm("Удалить заявку? Это действие необратимо.")) {
        router.delete(`/requests/${id}`, {
          onSuccess: () => {
            const index = requests.value.findIndex((r) => r.id === id);
            if (index !== -1) requests.value.splice(index, 1);
            toast.success("Заявка удалена");
          },
          onError: () => toast.error("Ошибка удаления")
        });
      }
    }
    const statusLabels = {
      new: "Новая",
      assigned: "Назначена",
      in_progress: "В работе",
      done: "Завершена",
      cancelled: "Отменена"
    };
    function openImage(path) {
      selectedImage.value = `/storage/${path}`;
      showImageModal.value = true;
    }
    onMounted(() => {
      if (window.Echo) {
        window.Echo.private("requests").listen(".InstallRequestAssigned", (e) => {
          toast.success(`Заявка #${e.id} назначена!`);
          updateRequest(e);
        }).listen(".InstallRequestCompleted", (e) => {
          toast.success(`Заявка #${e.id} завершена!`);
          updateRequest(e);
        }).listen(".InstallRequestRejected", (e) => {
          toast.success(`Заявка #${e.id} отклонена!`);
          updateRequest(e);
        });
      }
    });
    function updateRequest(updatedRequest) {
      const index = requests.value.findIndex((r) => r.id === updatedRequest.id);
      if (index !== -1) {
        requests.value[index] = { ...requests.value[index], ...updatedRequest };
      } else {
        requests.value.unshift(updatedRequest);
      }
    }
    const formatDateForAPI = (date) => date ? format(date, "yyyy-MM-dd") : null;
    const formatDateForDisplay = (date) => date ? format(date, "dd.MM.yyyy") : "";
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<!--[-->`);
      _push(ssrRenderComponent(unref(Head), { title: "Заявки на монтаж" }, null, _parent));
      _push(ssrRenderComponent(_sfc_main$p, { breadcrumbs }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="flex h-full flex-1 flex-col gap-4 rounded-xl pl-4 pb-4 pr-4"${_scopeId}>`);
            _push2(ssrRenderComponent(unref(_sfc_main$q), null, null, _parent2, _scopeId));
            _push2(`<div${_scopeId}><div class="flex flex-wrap justify-between items-center gap-4 mb-6"${_scopeId}><h1 class="text-2xl font-bold"${_scopeId}>Заявки</h1><div class="flex items-center gap-3"${_scopeId}><div class="flex flex-col"${_scopeId}>`);
            _push2(ssrRenderComponent(unref(_sfc_main$r), {
              id: "address",
              type: "text",
              modelValue: filterAddress.value,
              "onUpdate:modelValue": ($event) => filterAddress.value = $event,
              placeholder: "Введите адрес для поиска...",
              class: "w-64 rounded border px-3 py-2 text-sm text-gray-800"
            }, null, _parent2, _scopeId));
            _push2(`</div>`);
            if (unref(user).role === "admin" || unref(user).role === "engineer") {
              _push2(ssrRenderComponent(unref(Link), {
                href: "/requests/create",
                class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 h-9 px-4 py-2 has-[>svg]:px-3"
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(` Добавить заявку `);
                  } else {
                    return [
                      createTextVNode(" Добавить заявку ")
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
            } else {
              _push2(`<!---->`);
            }
            _push2(`</div></div>`);
            if (unref(user).role === "admin" || unref(user).role === "engineer") {
              _push2(`<div class="flex flex-wrap gap-4 mt-6 mb-6 items-center bg-gray-50 p-4 rounded-md shadow-sm border border-gray-200"${_scopeId}>`);
              _push2(ssrRenderComponent(unref(_sfc_main$s), {
                modelValue: filterStatus.value,
                "onUpdate:modelValue": ($event) => filterStatus.value = $event,
                class: "w-48"
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$t), { class: "w-48" }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$u), { placeholder: "Все статусы" }, null, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$u), { placeholder: "Все статусы" })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(unref(_sfc_main$v), null, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$w), null, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(_sfc_main$x), { value: null }, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Все статусы`);
                                    } else {
                                      return [
                                        createTextVNode("Все статусы")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$x), { value: "new" }, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Новая`);
                                    } else {
                                      return [
                                        createTextVNode("Новая")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$x), { value: "assigned" }, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Назначена`);
                                    } else {
                                      return [
                                        createTextVNode("Назначена")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$x), { value: "in_progress" }, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`В работе`);
                                    } else {
                                      return [
                                        createTextVNode("В работе")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$x), { value: "done" }, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Завершена`);
                                    } else {
                                      return [
                                        createTextVNode("Завершена")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$x), { value: "cancelled" }, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Отменена`);
                                    } else {
                                      return [
                                        createTextVNode("Отменена")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                              } else {
                                return [
                                  createVNode(unref(_sfc_main$x), { value: null }, {
                                    default: withCtx(() => [
                                      createTextVNode("Все статусы")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$x), { value: "new" }, {
                                    default: withCtx(() => [
                                      createTextVNode("Новая")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$x), { value: "assigned" }, {
                                    default: withCtx(() => [
                                      createTextVNode("Назначена")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$x), { value: "in_progress" }, {
                                    default: withCtx(() => [
                                      createTextVNode("В работе")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$x), { value: "done" }, {
                                    default: withCtx(() => [
                                      createTextVNode("Завершена")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$x), { value: "cancelled" }, {
                                    default: withCtx(() => [
                                      createTextVNode("Отменена")
                                    ]),
                                    _: 1
                                  })
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$w), null, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$x), { value: null }, {
                                  default: withCtx(() => [
                                    createTextVNode("Все статусы")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "new" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Новая")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "assigned" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Назначена")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "in_progress" }, {
                                  default: withCtx(() => [
                                    createTextVNode("В работе")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "done" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Завершена")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "cancelled" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Отменена")
                                  ]),
                                  _: 1
                                })
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$t), { class: "w-48" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$u), { placeholder: "Все статусы" })
                        ]),
                        _: 1
                      }),
                      createVNode(unref(_sfc_main$v), null, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$w), null, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$x), { value: null }, {
                                default: withCtx(() => [
                                  createTextVNode("Все статусы")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$x), { value: "new" }, {
                                default: withCtx(() => [
                                  createTextVNode("Новая")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$x), { value: "assigned" }, {
                                default: withCtx(() => [
                                  createTextVNode("Назначена")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$x), { value: "in_progress" }, {
                                default: withCtx(() => [
                                  createTextVNode("В работе")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$x), { value: "done" }, {
                                default: withCtx(() => [
                                  createTextVNode("Завершена")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$x), { value: "cancelled" }, {
                                default: withCtx(() => [
                                  createTextVNode("Отменена")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              if (unref(user).role === "admin" || unref(user).role === "engineer") {
                _push2(ssrRenderComponent(unref(_sfc_main$s), {
                  modelValue: filterInstallerId.value,
                  "onUpdate:modelValue": ($event) => filterInstallerId.value = $event,
                  class: "w-48"
                }, {
                  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                    if (_push3) {
                      _push3(ssrRenderComponent(unref(_sfc_main$t), { class: "w-48" }, {
                        default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(ssrRenderComponent(unref(_sfc_main$u), { placeholder: "Все монтажники" }, null, _parent4, _scopeId3));
                          } else {
                            return [
                              createVNode(unref(_sfc_main$u), { placeholder: "Все монтажники" })
                            ];
                          }
                        }),
                        _: 1
                      }, _parent3, _scopeId2));
                      _push3(ssrRenderComponent(unref(_sfc_main$v), null, {
                        default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(ssrRenderComponent(unref(_sfc_main$w), null, {
                              default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                                if (_push5) {
                                  _push5(ssrRenderComponent(unref(_sfc_main$x), { value: null }, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      if (_push6) {
                                        _push6(`Все монтажники`);
                                      } else {
                                        return [
                                          createTextVNode("Все монтажники")
                                        ];
                                      }
                                    }),
                                    _: 1
                                  }, _parent5, _scopeId4));
                                  _push5(`<!--[-->`);
                                  ssrRenderList(__props.installers, (installer) => {
                                    _push5(ssrRenderComponent(unref(_sfc_main$x), {
                                      key: installer.id,
                                      value: installer.id
                                    }, {
                                      default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                        if (_push6) {
                                          _push6(`${ssrInterpolate(installer.name)}`);
                                        } else {
                                          return [
                                            createTextVNode(toDisplayString(installer.name), 1)
                                          ];
                                        }
                                      }),
                                      _: 2
                                    }, _parent5, _scopeId4));
                                  });
                                  _push5(`<!--]-->`);
                                } else {
                                  return [
                                    createVNode(unref(_sfc_main$x), { value: null }, {
                                      default: withCtx(() => [
                                        createTextVNode("Все монтажники")
                                      ]),
                                      _: 1
                                    }),
                                    (openBlock(true), createBlock(Fragment, null, renderList(__props.installers, (installer) => {
                                      return openBlock(), createBlock(unref(_sfc_main$x), {
                                        key: installer.id,
                                        value: installer.id
                                      }, {
                                        default: withCtx(() => [
                                          createTextVNode(toDisplayString(installer.name), 1)
                                        ]),
                                        _: 2
                                      }, 1032, ["value"]);
                                    }), 128))
                                  ];
                                }
                              }),
                              _: 1
                            }, _parent4, _scopeId3));
                          } else {
                            return [
                              createVNode(unref(_sfc_main$w), null, {
                                default: withCtx(() => [
                                  createVNode(unref(_sfc_main$x), { value: null }, {
                                    default: withCtx(() => [
                                      createTextVNode("Все монтажники")
                                    ]),
                                    _: 1
                                  }),
                                  (openBlock(true), createBlock(Fragment, null, renderList(__props.installers, (installer) => {
                                    return openBlock(), createBlock(unref(_sfc_main$x), {
                                      key: installer.id,
                                      value: installer.id
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(installer.name), 1)
                                      ]),
                                      _: 2
                                    }, 1032, ["value"]);
                                  }), 128))
                                ]),
                                _: 1
                              })
                            ];
                          }
                        }),
                        _: 1
                      }, _parent3, _scopeId2));
                    } else {
                      return [
                        createVNode(unref(_sfc_main$t), { class: "w-48" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$u), { placeholder: "Все монтажники" })
                          ]),
                          _: 1
                        }),
                        createVNode(unref(_sfc_main$v), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$w), null, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$x), { value: null }, {
                                  default: withCtx(() => [
                                    createTextVNode("Все монтажники")
                                  ]),
                                  _: 1
                                }),
                                (openBlock(true), createBlock(Fragment, null, renderList(__props.installers, (installer) => {
                                  return openBlock(), createBlock(unref(_sfc_main$x), {
                                    key: installer.id,
                                    value: installer.id
                                  }, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(installer.name), 1)
                                    ]),
                                    _: 2
                                  }, 1032, ["value"]);
                                }), 128))
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ];
                    }
                  }),
                  _: 1
                }, _parent2, _scopeId));
              } else {
                _push2(`<!---->`);
              }
              _push2(ssrRenderComponent(unref(_sfc_main$c), null, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$9), { "as-child": "" }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$y), {
                            variant: "outline",
                            class: "w-40 justify-start text-left font-normal"
                          }, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }, null, _parent5, _scopeId4));
                                _push5(`<span${_scopeId4}>${ssrInterpolate(filterDateFrom.value ? formatDateForDisplay(filterDateFrom.value) : "Выберите дату")}</span>`);
                              } else {
                                return [
                                  createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                                  createVNode("span", null, toDisplayString(filterDateFrom.value ? formatDateForDisplay(filterDateFrom.value) : "Выберите дату"), 1)
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$y), {
                              variant: "outline",
                              class: "w-40 justify-start text-left font-normal"
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                                createVNode("span", null, toDisplayString(filterDateFrom.value ? formatDateForDisplay(filterDateFrom.value) : "Выберите дату"), 1)
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(unref(_sfc_main$a), { class: "w-auto p-0" }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$o), {
                            modelValue: filterDateFrom.value,
                            "onUpdate:modelValue": ($event) => filterDateFrom.value = $event,
                            mode: "single",
                            selected: filterDateFrom.value
                          }, null, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$o), {
                              modelValue: filterDateFrom.value,
                              "onUpdate:modelValue": ($event) => filterDateFrom.value = $event,
                              mode: "single",
                              selected: filterDateFrom.value
                            }, null, 8, ["modelValue", "onUpdate:modelValue", "selected"])
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$9), { "as-child": "" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$y), {
                            variant: "outline",
                            class: "w-40 justify-start text-left font-normal"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                              createVNode("span", null, toDisplayString(filterDateFrom.value ? formatDateForDisplay(filterDateFrom.value) : "Выберите дату"), 1)
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      }),
                      createVNode(unref(_sfc_main$a), { class: "w-auto p-0" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$o), {
                            modelValue: filterDateFrom.value,
                            "onUpdate:modelValue": ($event) => filterDateFrom.value = $event,
                            mode: "single",
                            selected: filterDateFrom.value
                          }, null, 8, ["modelValue", "onUpdate:modelValue", "selected"])
                        ]),
                        _: 1
                      })
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(ssrRenderComponent(unref(_sfc_main$c), null, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$9), { "as-child": "" }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$y), {
                            variant: "outline",
                            class: "w-40 justify-start text-left font-normal"
                          }, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }, null, _parent5, _scopeId4));
                                _push5(`<span${_scopeId4}>${ssrInterpolate(filterDateTo.value ? formatDateForDisplay(filterDateTo.value) : "Выберите дату")}</span>`);
                              } else {
                                return [
                                  createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                                  createVNode("span", null, toDisplayString(filterDateTo.value ? formatDateForDisplay(filterDateTo.value) : "Выберите дату"), 1)
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$y), {
                              variant: "outline",
                              class: "w-40 justify-start text-left font-normal"
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                                createVNode("span", null, toDisplayString(filterDateTo.value ? formatDateForDisplay(filterDateTo.value) : "Выберите дату"), 1)
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(unref(_sfc_main$a), { class: "w-auto p-0" }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$o), {
                            modelValue: filterDateTo.value,
                            "onUpdate:modelValue": ($event) => filterDateTo.value = $event,
                            mode: "single",
                            selected: filterDateTo.value
                          }, null, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$o), {
                              modelValue: filterDateTo.value,
                              "onUpdate:modelValue": ($event) => filterDateTo.value = $event,
                              mode: "single",
                              selected: filterDateTo.value
                            }, null, 8, ["modelValue", "onUpdate:modelValue", "selected"])
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$9), { "as-child": "" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$y), {
                            variant: "outline",
                            class: "w-40 justify-start text-left font-normal"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                              createVNode("span", null, toDisplayString(filterDateTo.value ? formatDateForDisplay(filterDateTo.value) : "Выберите дату"), 1)
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      }),
                      createVNode(unref(_sfc_main$a), { class: "w-auto p-0" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$o), {
                            modelValue: filterDateTo.value,
                            "onUpdate:modelValue": ($event) => filterDateTo.value = $event,
                            mode: "single",
                            selected: filterDateTo.value
                          }, null, 8, ["modelValue", "onUpdate:modelValue", "selected"])
                        ]),
                        _: 1
                      })
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(ssrRenderComponent(unref(_sfc_main$y), {
                variant: "outline",
                class: "ml-auto max-w-[140px]",
                onClick: resetFilters
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(` Сбросить фильтр `);
                  } else {
                    return [
                      createTextVNode(" Сбросить фильтр ")
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(`</div>`);
            } else {
              _push2(`<!---->`);
            }
            if (loading.value) {
              _push2(`<div class="flex justify-center my-8"${_scopeId}><svg class="animate-spin h-6 w-6 text-gray-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"${_scopeId}><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"${_scopeId}></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"${_scopeId}></path></svg></div>`);
            } else if (!requests.value.length) {
              _push2(`<div class="text-center text-gray-500 py-10 bg-white rounded-lg border border-gray-200 shadow-sm"${_scopeId}><p class="text-lg font-medium"${_scopeId}>Заявок не найдено</p><p class="text-sm mt-1"${_scopeId}>Попробуйте изменить фильтры или сбросить их</p></div>`);
            } else {
              _push2(`<div${_scopeId}><!--[-->`);
              ssrRenderList(requests.value, (r) => {
                var _a, _b, _c, _d, _e, _f;
                _push2(`<div class="${ssrRenderClass([{
                  "border-yellow-400": r.status === "assigned",
                  "border-green-500": r.status === "done",
                  "border-red-400": r.status === "cancelled",
                  "border-gray-300": r.status === "new" || r.status === "in_progress"
                }, "rounded-xl shadow-sm p-6 mt-6 mb-6 bg-white border-l-4"])}"${_scopeId}><div class="flex items-center justify-between mb-2"${_scopeId}><h2 class="text-xl font-semibold"${_scopeId}>${ssrInterpolate(r.title)}</h2><div class="flex flex-col items-end"${_scopeId}><span class="${ssrRenderClass([{
                  "text-yellow-600": r.status === "assigned",
                  "text-green-600": r.status === "done",
                  "text-red-600": r.status === "cancelled",
                  "text-gray-500": r.status === "new" || r.status === "in_progress"
                }, "text-sm font-semibold"])}"${_scopeId}>${ssrInterpolate(statusLabels[r.status] || r.status)}</span><span class="text-xs font-medium bg-gray-200 text-gray-800 px-2 py-0.5 rounded-full"${_scopeId}> Заявка № ${ssrInterpolate(r.id)}</span></div></div><div class="text-sm text-gray-700 space-y-4"${_scopeId}><div class="grid grid-cols-1 sm:grid-cols-2 gap-4"${_scopeId}><div class="flex flex-col"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Регион</span><span class="font-medium"${_scopeId}>${ssrInterpolate(r.region || "—")}</span></div><div class="flex flex-col"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Адрес</span><span class="font-medium"${_scopeId}>${ssrInterpolate(r.address)}</span></div><div class="flex flex-col"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Дата установки</span><span class="font-medium"${_scopeId}>${ssrInterpolate(r.scheduled_date ? formatDateForDisplay(new Date(r.scheduled_date)) : "—")}</span></div><div class="flex flex-col"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Субъект</span><span class="font-medium"${_scopeId}>${ssrInterpolate(r.subject && r.subject.trim() !== "" ? r.subject : "—")}</span></div><div class="flex flex-col sm:col-span-2"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Описание</span><span class="font-medium"${_scopeId}>${ssrInterpolate(r.description || "—")}</span></div><div class="flex flex-col sm:col-span-2"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Ответственный за монтаж</span><span class="font-medium"${_scopeId}>${ssrInterpolate(((_a = r.installer) == null ? void 0 : _a.name) || "—")}</span></div></div><div class="border-t pt-4"${_scopeId}></div><div class="grid grid-cols-1 sm:grid-cols-2 gap-4"${_scopeId}><div class="flex flex-col"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Клиент</span><span class="font-medium"${_scopeId}>${ssrInterpolate(r.client_name && r.client_name.trim() !== "" ? r.client_name : "—")}</span></div><div class="flex flex-col"${_scopeId}><span class="text-xs uppercase text-gray-400 font-medium"${_scopeId}>Телефон</span><span class="font-medium text-blue-600 hover:underline"${_scopeId}>`);
                if (r.client_phone) {
                  _push2(`<a${ssrRenderAttr("href", `tel:${r.client_phone}`)}${_scopeId}>${ssrInterpolate(r.client_phone)}</a>`);
                } else {
                  _push2(`<span${_scopeId}>—</span>`);
                }
                _push2(`</span></div></div>`);
                if ((_b = r.photos) == null ? void 0 : _b.length) {
                  _push2(`<div class="pt-4"${_scopeId}><span class="text-xs uppercase text-gray-400 font-semibold block mb-2"${_scopeId}>Фото</span><div class="flex flex-wrap gap-2"${_scopeId}><!--[-->`);
                  ssrRenderList(r.photos, (photo) => {
                    _push2(`<img${ssrRenderAttr("src", `/storage/${photo.path}`)} alt="Фото" class="w-28 h-28 rounded-lg object-cover border shadow-sm cursor-pointer hover:scale-[1.03] transition"${_scopeId}>`);
                  });
                  _push2(`<!--]--></div></div>`);
                } else {
                  _push2(`<!---->`);
                }
                _push2(`</div>`);
                _push2(ssrRenderComponent(unref(_sfc_main$z), {
                  open: showImageModal.value,
                  "onUpdate:open": ($event) => showImageModal.value = $event
                }, {
                  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                    if (_push3) {
                      _push3(ssrRenderComponent(unref(_sfc_main$A), { class: "bg-black/60 fixed inset-0" }, null, _parent3, _scopeId2));
                      _push3(ssrRenderComponent(unref(_sfc_main$B), { class: "bg-white dark:bg-gray-900 p-0 rounded-xl shadow-xl max-w-5xl w-full overflow-hidden" }, {
                        default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                          if (_push4) {
                            _push4(`<img${ssrRenderAttr("src", selectedImage.value)} alt="Фото" class="w-full h-auto object-contain max-h-[90vh]"${_scopeId3}>`);
                          } else {
                            return [
                              createVNode("img", {
                                src: selectedImage.value,
                                alt: "Фото",
                                class: "w-full h-auto object-contain max-h-[90vh]"
                              }, null, 8, ["src"])
                            ];
                          }
                        }),
                        _: 2
                      }, _parent3, _scopeId2));
                    } else {
                      return [
                        createVNode(unref(_sfc_main$A), { class: "bg-black/60 fixed inset-0" }),
                        createVNode(unref(_sfc_main$B), { class: "bg-white dark:bg-gray-900 p-0 rounded-xl shadow-xl max-w-5xl w-full overflow-hidden" }, {
                          default: withCtx(() => [
                            createVNode("img", {
                              src: selectedImage.value,
                              alt: "Фото",
                              class: "w-full h-auto object-contain max-h-[90vh]"
                            }, null, 8, ["src"])
                          ]),
                          _: 1
                        })
                      ];
                    }
                  }),
                  _: 2
                }, _parent2, _scopeId));
                if (unref(user).role === "installer" && (!r.assigned_to || r.status === "new")) {
                  _push2(`<div class="mt-4"${_scopeId}><button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm"${_scopeId}> Взять в работу </button></div>`);
                } else {
                  _push2(`<!---->`);
                }
                if (unref(user).role === "installer" && r.assigned_to === unref(user).id && r.status === "assigned") {
                  _push2(`<div class="mt-4 flex flex-col gap-2"${_scopeId}><textarea placeholder="Комментарий при завершении" class="w-full rounded border px-3 py-2 text-sm text-gray-800" rows="3"${_scopeId}>${ssrInterpolate(commentInputs.value[r.id])}</textarea><input${ssrRenderAttr("value", priceInputs.value[r.id])} type="number" step="0.01" placeholder="Цена монтажа" class="w-full rounded border px-3 py-2 text-sm text-gray-800"${_scopeId}><button class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm self-start"${_scopeId}> Завершить </button></div>`);
                } else {
                  _push2(`<!---->`);
                }
                if ((unref(user).role === "admin" || unref(user).role === "engineer") && r.status === "done") {
                  _push2(`<div class="mt-3 space-y-2"${_scopeId}>`);
                  _push2(ssrRenderComponent(unref(Link), {
                    href: `/requests/${r.id}/rate`,
                    class: "text-blue-600 underline text-sm hover:text-blue-800"
                  }, {
                    default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                      if (_push3) {
                        _push3(` Оценить монтажника `);
                      } else {
                        return [
                          createTextVNode(" Оценить монтажника ")
                        ];
                      }
                    }),
                    _: 2
                  }, _parent2, _scopeId));
                  if (r.actions && r.actions.length && r.actions[0].installation_price !== null) {
                    _push2(`<div class="mt-4 p-4 rounded-xl border bg-amber-50 border-amber-200/70 shadow-sm flex items-start gap-3"${_scopeId}><div class="flex items-center justify-center w-10 h-10 rounded-lg bg-amber-100 text-amber-600"${_scopeId}><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8V4m0 12v4"${_scopeId}></path></svg></div><div${_scopeId}><div class="text-xs uppercase text-amber-700 font-semibold tracking-wide"${_scopeId}> Стоимость монтажа </div><div class="mt-1 text-lg font-semibold text-amber-900 flex items-baseline"${_scopeId}>${(() => {
                      const formatted = Number(r.actions[0].installation_price).toLocaleString("ru-RU", {
                        minimumFractionDigits: 2,
                        maximumFractionDigits: 2
                      }).replace(",", ".");
                      const match = formatted.match(/(\d+)\.(\d{2})/);
                      if (!match) return formatted + " BYN";
                      const amount = match[1];
                      const cents = match[2];
                      return `
                                                ${amount}.
                                                <span class='text-xs align-super leading-none ml-0.5'>${cents}</span>
                                                <span class='ml-1 text-sm text-amber-700 font-medium'>BYN</span>
                                            `;
                    })() ?? ""}</div></div></div>`);
                  } else {
                    _push2(`<!---->`);
                  }
                  if ((_c = r.actions) == null ? void 0 : _c.some((a) => a.action === "completed" && a.note)) {
                    _push2(`<div class="mt-4 p-4 rounded-xl border bg-emerald-50 border-emerald-200/70 shadow-sm flex items-start gap-3"${_scopeId}><div class="flex items-center justify-center w-10 h-10 rounded-lg bg-emerald-100 text-emerald-600"${_scopeId}><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16h6m2 4H7a2 2 0 01-2-2V6a2 2 0 012-2h2l2-2h2l2 2h2a2 2 0 012 2v12a2 2 0 01-2 2z"${_scopeId}></path></svg></div><div${_scopeId}><div class="text-xs uppercase text-emerald-700 font-semibold tracking-wide"${_scopeId}> Комментарий монтажника </div><p class="mt-1 whitespace-pre-line text-emerald-900"${_scopeId}>${ssrInterpolate((_d = r.actions.find((a) => a.action === "completed")) == null ? void 0 : _d.note)}</p></div></div>`);
                  } else {
                    _push2(`<!---->`);
                  }
                  if (unref(user) && (unref(user).role === "admin" || unref(user).role === "engineer") && ((_e = r.actions) == null ? void 0 : _e.length) && r.actions.some((a) => a.action === "rejected")) {
                    _push2(`<div class="mt-4 p-4 rounded-xl border bg-red-50 border-red-200/70 shadow-sm flex items-start gap-3"${_scopeId}><div class="flex items-center justify-center w-10 h-10 rounded-lg bg-red-100 text-red-600"${_scopeId}><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8V4m0 12v4"${_scopeId}></path></svg></div><div${_scopeId}><div class="text-xs uppercase text-red-700 font-semibold tracking-wide"${_scopeId}> Комментарий монтажника при отказе </div><p class="mt-1 whitespace-pre-line text-red-900"${_scopeId}>${ssrInterpolate(((_f = r.actions.find((a) => a.action === "rejected")) == null ? void 0 : _f.note) ?? "—")}</p></div></div>`);
                  } else {
                    _push2(`<!---->`);
                  }
                  _push2(`</div>`);
                } else {
                  _push2(`<!---->`);
                }
                if (unref(user).role === "admin" || unref(user).role === "engineer") {
                  _push2(`<div class="mt-4 flex gap-2"${_scopeId}>`);
                  _push2(ssrRenderComponent(unref(Link), {
                    href: `/requests/${r.id}/edit`,
                    class: "px-4 py-2 text-sm font-semibold text-blue-700 bg-blue-50 rounded-md shadow-sm hover:bg-blue-100 hover:shadow-md transition cursor-pointer"
                  }, {
                    default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                      if (_push3) {
                        _push3(` Редактировать `);
                      } else {
                        return [
                          createTextVNode(" Редактировать ")
                        ];
                      }
                    }),
                    _: 2
                  }, _parent2, _scopeId));
                  _push2(`<button class="px-4 py-2 text-sm font-semibold text-red-700 bg-red-50 rounded-md shadow-sm hover:bg-red-100 hover:shadow-md transition cursor-pointer"${_scopeId}> Удалить </button></div>`);
                } else {
                  _push2(`<!---->`);
                }
                _push2(`</div>`);
              });
              _push2(`<!--]-->`);
              _push2(ssrRenderComponent(unref(_sfc_main$8), {
                total: props.requests.total,
                "items-per-page": props.requests.per_page,
                "default-page": props.requests.current_page
              }, {
                default: withCtx(({ page, setPage }, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$7), null, {
                      default: withCtx(({ items }, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$1), {
                            disabled: !props.requests.prev_page_url,
                            onClick: ($event) => goToPage(props.requests.current_page - 1)
                          }, {
                            default: withCtx((_2, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(`<span class="sr-only"${_scopeId4}>Previous</span><svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"${_scopeId4}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"${_scopeId4}></path></svg>`);
                              } else {
                                return [
                                  createVNode("span", { class: "sr-only" }, "Previous"),
                                  (openBlock(), createBlock("svg", {
                                    class: "h-4 w-4",
                                    fill: "none",
                                    stroke: "currentColor",
                                    viewBox: "0 0 24 24"
                                  }, [
                                    createVNode("path", {
                                      "stroke-linecap": "round",
                                      "stroke-linejoin": "round",
                                      "stroke-width": "2",
                                      d: "M15 19l-7-7 7-7"
                                    })
                                  ]))
                                ];
                              }
                            }),
                            _: 2
                          }, _parent4, _scopeId3));
                          _push4(`<!--[-->`);
                          ssrRenderList(items, (item) => {
                            _push4(`<!--[-->`);
                            if (item.type === "page") {
                              _push4(ssrRenderComponent(unref(_sfc_main$4), {
                                value: item.value,
                                "is-active": item.value === props.requests.current_page,
                                onClick: ($event) => goToPage(item.value)
                              }, {
                                default: withCtx((_2, _push5, _parent5, _scopeId4) => {
                                  if (_push5) {
                                    _push5(`${ssrInterpolate(item.value)}`);
                                  } else {
                                    return [
                                      createTextVNode(toDisplayString(item.value), 1)
                                    ];
                                  }
                                }),
                                _: 2
                              }, _parent4, _scopeId3));
                            } else {
                              _push4(ssrRenderComponent(unref(_sfc_main$6), null, null, _parent4, _scopeId3));
                            }
                            _push4(`<!--]-->`);
                          });
                          _push4(`<!--]-->`);
                          _push4(ssrRenderComponent(unref(_sfc_main$2), {
                            disabled: !props.requests.next_page_url,
                            onClick: ($event) => goToPage(props.requests.current_page + 1)
                          }, {
                            default: withCtx((_2, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(`<span class="sr-only"${_scopeId4}>Next</span><svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"${_scopeId4}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"${_scopeId4}></path></svg>`);
                              } else {
                                return [
                                  createVNode("span", { class: "sr-only" }, "Next"),
                                  (openBlock(), createBlock("svg", {
                                    class: "h-4 w-4",
                                    fill: "none",
                                    stroke: "currentColor",
                                    viewBox: "0 0 24 24"
                                  }, [
                                    createVNode("path", {
                                      "stroke-linecap": "round",
                                      "stroke-linejoin": "round",
                                      "stroke-width": "2",
                                      d: "M9 5l7 7-7 7"
                                    })
                                  ]))
                                ];
                              }
                            }),
                            _: 2
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$1), {
                              disabled: !props.requests.prev_page_url,
                              onClick: ($event) => goToPage(props.requests.current_page - 1)
                            }, {
                              default: withCtx(() => [
                                createVNode("span", { class: "sr-only" }, "Previous"),
                                (openBlock(), createBlock("svg", {
                                  class: "h-4 w-4",
                                  fill: "none",
                                  stroke: "currentColor",
                                  viewBox: "0 0 24 24"
                                }, [
                                  createVNode("path", {
                                    "stroke-linecap": "round",
                                    "stroke-linejoin": "round",
                                    "stroke-width": "2",
                                    d: "M15 19l-7-7 7-7"
                                  })
                                ]))
                              ]),
                              _: 1
                            }, 8, ["disabled", "onClick"]),
                            (openBlock(true), createBlock(Fragment, null, renderList(items, (item) => {
                              return openBlock(), createBlock(Fragment, {
                                key: item.value
                              }, [
                                item.type === "page" ? (openBlock(), createBlock(unref(_sfc_main$4), {
                                  key: 0,
                                  value: item.value,
                                  "is-active": item.value === props.requests.current_page,
                                  onClick: ($event) => goToPage(item.value)
                                }, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(item.value), 1)
                                  ]),
                                  _: 2
                                }, 1032, ["value", "is-active", "onClick"])) : (openBlock(), createBlock(unref(_sfc_main$6), { key: 1 }))
                              ], 64);
                            }), 128)),
                            createVNode(unref(_sfc_main$2), {
                              disabled: !props.requests.next_page_url,
                              onClick: ($event) => goToPage(props.requests.current_page + 1)
                            }, {
                              default: withCtx(() => [
                                createVNode("span", { class: "sr-only" }, "Next"),
                                (openBlock(), createBlock("svg", {
                                  class: "h-4 w-4",
                                  fill: "none",
                                  stroke: "currentColor",
                                  viewBox: "0 0 24 24"
                                }, [
                                  createVNode("path", {
                                    "stroke-linecap": "round",
                                    "stroke-linejoin": "round",
                                    "stroke-width": "2",
                                    d: "M9 5l7 7-7 7"
                                  })
                                ]))
                              ]),
                              _: 1
                            }, 8, ["disabled", "onClick"])
                          ];
                        }
                      }),
                      _: 2
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$7), null, {
                        default: withCtx(({ items }) => [
                          createVNode(unref(_sfc_main$1), {
                            disabled: !props.requests.prev_page_url,
                            onClick: ($event) => goToPage(props.requests.current_page - 1)
                          }, {
                            default: withCtx(() => [
                              createVNode("span", { class: "sr-only" }, "Previous"),
                              (openBlock(), createBlock("svg", {
                                class: "h-4 w-4",
                                fill: "none",
                                stroke: "currentColor",
                                viewBox: "0 0 24 24"
                              }, [
                                createVNode("path", {
                                  "stroke-linecap": "round",
                                  "stroke-linejoin": "round",
                                  "stroke-width": "2",
                                  d: "M15 19l-7-7 7-7"
                                })
                              ]))
                            ]),
                            _: 1
                          }, 8, ["disabled", "onClick"]),
                          (openBlock(true), createBlock(Fragment, null, renderList(items, (item) => {
                            return openBlock(), createBlock(Fragment, {
                              key: item.value
                            }, [
                              item.type === "page" ? (openBlock(), createBlock(unref(_sfc_main$4), {
                                key: 0,
                                value: item.value,
                                "is-active": item.value === props.requests.current_page,
                                onClick: ($event) => goToPage(item.value)
                              }, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(item.value), 1)
                                ]),
                                _: 2
                              }, 1032, ["value", "is-active", "onClick"])) : (openBlock(), createBlock(unref(_sfc_main$6), { key: 1 }))
                            ], 64);
                          }), 128)),
                          createVNode(unref(_sfc_main$2), {
                            disabled: !props.requests.next_page_url,
                            onClick: ($event) => goToPage(props.requests.current_page + 1)
                          }, {
                            default: withCtx(() => [
                              createVNode("span", { class: "sr-only" }, "Next"),
                              (openBlock(), createBlock("svg", {
                                class: "h-4 w-4",
                                fill: "none",
                                stroke: "currentColor",
                                viewBox: "0 0 24 24"
                              }, [
                                createVNode("path", {
                                  "stroke-linecap": "round",
                                  "stroke-linejoin": "round",
                                  "stroke-width": "2",
                                  d: "M9 5l7 7-7 7"
                                })
                              ]))
                            ]),
                            _: 1
                          }, 8, ["disabled", "onClick"])
                        ]),
                        _: 1
                      })
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(`</div>`);
            }
            _push2(`</div></div>`);
          } else {
            return [
              createVNode("div", { class: "flex h-full flex-1 flex-col gap-4 rounded-xl pl-4 pb-4 pr-4" }, [
                createVNode(unref(_sfc_main$q)),
                createVNode("div", null, [
                  createVNode("div", { class: "flex flex-wrap justify-between items-center gap-4 mb-6" }, [
                    createVNode("h1", { class: "text-2xl font-bold" }, "Заявки"),
                    createVNode("div", { class: "flex items-center gap-3" }, [
                      createVNode("div", { class: "flex flex-col" }, [
                        createVNode(unref(_sfc_main$r), {
                          id: "address",
                          type: "text",
                          modelValue: filterAddress.value,
                          "onUpdate:modelValue": ($event) => filterAddress.value = $event,
                          placeholder: "Введите адрес для поиска...",
                          class: "w-64 rounded border px-3 py-2 text-sm text-gray-800"
                        }, null, 8, ["modelValue", "onUpdate:modelValue"])
                      ]),
                      unref(user).role === "admin" || unref(user).role === "engineer" ? (openBlock(), createBlock(unref(Link), {
                        key: 0,
                        href: "/requests/create",
                        class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 h-9 px-4 py-2 has-[>svg]:px-3"
                      }, {
                        default: withCtx(() => [
                          createTextVNode(" Добавить заявку ")
                        ]),
                        _: 1
                      })) : createCommentVNode("", true)
                    ])
                  ]),
                  unref(user).role === "admin" || unref(user).role === "engineer" ? (openBlock(), createBlock("div", {
                    key: 0,
                    class: "flex flex-wrap gap-4 mt-6 mb-6 items-center bg-gray-50 p-4 rounded-md shadow-sm border border-gray-200"
                  }, [
                    createVNode(unref(_sfc_main$s), {
                      modelValue: filterStatus.value,
                      "onUpdate:modelValue": ($event) => filterStatus.value = $event,
                      class: "w-48"
                    }, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$t), { class: "w-48" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$u), { placeholder: "Все статусы" })
                          ]),
                          _: 1
                        }),
                        createVNode(unref(_sfc_main$v), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$w), null, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$x), { value: null }, {
                                  default: withCtx(() => [
                                    createTextVNode("Все статусы")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "new" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Новая")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "assigned" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Назначена")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "in_progress" }, {
                                  default: withCtx(() => [
                                    createTextVNode("В работе")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "done" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Завершена")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$x), { value: "cancelled" }, {
                                  default: withCtx(() => [
                                    createTextVNode("Отменена")
                                  ]),
                                  _: 1
                                })
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }, 8, ["modelValue", "onUpdate:modelValue"]),
                    unref(user).role === "admin" || unref(user).role === "engineer" ? (openBlock(), createBlock(unref(_sfc_main$s), {
                      key: 0,
                      modelValue: filterInstallerId.value,
                      "onUpdate:modelValue": ($event) => filterInstallerId.value = $event,
                      class: "w-48"
                    }, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$t), { class: "w-48" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$u), { placeholder: "Все монтажники" })
                          ]),
                          _: 1
                        }),
                        createVNode(unref(_sfc_main$v), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$w), null, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$x), { value: null }, {
                                  default: withCtx(() => [
                                    createTextVNode("Все монтажники")
                                  ]),
                                  _: 1
                                }),
                                (openBlock(true), createBlock(Fragment, null, renderList(__props.installers, (installer) => {
                                  return openBlock(), createBlock(unref(_sfc_main$x), {
                                    key: installer.id,
                                    value: installer.id
                                  }, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(installer.name), 1)
                                    ]),
                                    _: 2
                                  }, 1032, ["value"]);
                                }), 128))
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }, 8, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true),
                    createVNode(unref(_sfc_main$c), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$9), { "as-child": "" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$y), {
                              variant: "outline",
                              class: "w-40 justify-start text-left font-normal"
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                                createVNode("span", null, toDisplayString(filterDateFrom.value ? formatDateForDisplay(filterDateFrom.value) : "Выберите дату"), 1)
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        }),
                        createVNode(unref(_sfc_main$a), { class: "w-auto p-0" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$o), {
                              modelValue: filterDateFrom.value,
                              "onUpdate:modelValue": ($event) => filterDateFrom.value = $event,
                              mode: "single",
                              selected: filterDateFrom.value
                            }, null, 8, ["modelValue", "onUpdate:modelValue", "selected"])
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$c), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$9), { "as-child": "" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$y), {
                              variant: "outline",
                              class: "w-40 justify-start text-left font-normal"
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(CalendarIcon), { class: "mr-2 h-4 w-4" }),
                                createVNode("span", null, toDisplayString(filterDateTo.value ? formatDateForDisplay(filterDateTo.value) : "Выберите дату"), 1)
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        }),
                        createVNode(unref(_sfc_main$a), { class: "w-auto p-0" }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$o), {
                              modelValue: filterDateTo.value,
                              "onUpdate:modelValue": ($event) => filterDateTo.value = $event,
                              mode: "single",
                              selected: filterDateTo.value
                            }, null, 8, ["modelValue", "onUpdate:modelValue", "selected"])
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$y), {
                      variant: "outline",
                      class: "ml-auto max-w-[140px]",
                      onClick: resetFilters
                    }, {
                      default: withCtx(() => [
                        createTextVNode(" Сбросить фильтр ")
                      ]),
                      _: 1
                    })
                  ])) : createCommentVNode("", true),
                  loading.value ? (openBlock(), createBlock("div", {
                    key: 1,
                    class: "flex justify-center my-8"
                  }, [
                    (openBlock(), createBlock("svg", {
                      class: "animate-spin h-6 w-6 text-gray-600",
                      xmlns: "http://www.w3.org/2000/svg",
                      fill: "none",
                      viewBox: "0 0 24 24"
                    }, [
                      createVNode("circle", {
                        class: "opacity-25",
                        cx: "12",
                        cy: "12",
                        r: "10",
                        stroke: "currentColor",
                        "stroke-width": "4"
                      }),
                      createVNode("path", {
                        class: "opacity-75",
                        fill: "currentColor",
                        d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
                      })
                    ]))
                  ])) : !requests.value.length ? (openBlock(), createBlock("div", {
                    key: 2,
                    class: "text-center text-gray-500 py-10 bg-white rounded-lg border border-gray-200 shadow-sm"
                  }, [
                    createVNode("p", { class: "text-lg font-medium" }, "Заявок не найдено"),
                    createVNode("p", { class: "text-sm mt-1" }, "Попробуйте изменить фильтры или сбросить их")
                  ])) : (openBlock(), createBlock("div", { key: 3 }, [
                    (openBlock(true), createBlock(Fragment, null, renderList(requests.value, (r) => {
                      var _a, _b, _c, _d, _e, _f;
                      return openBlock(), createBlock("div", {
                        key: r.id,
                        class: ["rounded-xl shadow-sm p-6 mt-6 mb-6 bg-white border-l-4", {
                          "border-yellow-400": r.status === "assigned",
                          "border-green-500": r.status === "done",
                          "border-red-400": r.status === "cancelled",
                          "border-gray-300": r.status === "new" || r.status === "in_progress"
                        }]
                      }, [
                        createVNode("div", { class: "flex items-center justify-between mb-2" }, [
                          createVNode("h2", { class: "text-xl font-semibold" }, toDisplayString(r.title), 1),
                          createVNode("div", { class: "flex flex-col items-end" }, [
                            createVNode("span", {
                              class: ["text-sm font-semibold", {
                                "text-yellow-600": r.status === "assigned",
                                "text-green-600": r.status === "done",
                                "text-red-600": r.status === "cancelled",
                                "text-gray-500": r.status === "new" || r.status === "in_progress"
                              }]
                            }, toDisplayString(statusLabels[r.status] || r.status), 3),
                            createVNode("span", { class: "text-xs font-medium bg-gray-200 text-gray-800 px-2 py-0.5 rounded-full" }, " Заявка № " + toDisplayString(r.id), 1)
                          ])
                        ]),
                        createVNode("div", { class: "text-sm text-gray-700 space-y-4" }, [
                          createVNode("div", { class: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, [
                            createVNode("div", { class: "flex flex-col" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Регион"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(r.region || "—"), 1)
                            ]),
                            createVNode("div", { class: "flex flex-col" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Адрес"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(r.address), 1)
                            ]),
                            createVNode("div", { class: "flex flex-col" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Дата установки"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(r.scheduled_date ? formatDateForDisplay(new Date(r.scheduled_date)) : "—"), 1)
                            ]),
                            createVNode("div", { class: "flex flex-col" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Субъект"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(r.subject && r.subject.trim() !== "" ? r.subject : "—"), 1)
                            ]),
                            createVNode("div", { class: "flex flex-col sm:col-span-2" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Описание"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(r.description || "—"), 1)
                            ]),
                            createVNode("div", { class: "flex flex-col sm:col-span-2" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Ответственный за монтаж"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(((_a = r.installer) == null ? void 0 : _a.name) || "—"), 1)
                            ])
                          ]),
                          createVNode("div", { class: "border-t pt-4" }),
                          createVNode("div", { class: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, [
                            createVNode("div", { class: "flex flex-col" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Клиент"),
                              createVNode("span", { class: "font-medium" }, toDisplayString(r.client_name && r.client_name.trim() !== "" ? r.client_name : "—"), 1)
                            ]),
                            createVNode("div", { class: "flex flex-col" }, [
                              createVNode("span", { class: "text-xs uppercase text-gray-400 font-medium" }, "Телефон"),
                              createVNode("span", { class: "font-medium text-blue-600 hover:underline" }, [
                                r.client_phone ? (openBlock(), createBlock("a", {
                                  key: 0,
                                  href: `tel:${r.client_phone}`
                                }, toDisplayString(r.client_phone), 9, ["href"])) : (openBlock(), createBlock("span", { key: 1 }, "—"))
                              ])
                            ])
                          ]),
                          ((_b = r.photos) == null ? void 0 : _b.length) ? (openBlock(), createBlock("div", {
                            key: 0,
                            class: "pt-4"
                          }, [
                            createVNode("span", { class: "text-xs uppercase text-gray-400 font-semibold block mb-2" }, "Фото"),
                            createVNode("div", { class: "flex flex-wrap gap-2" }, [
                              (openBlock(true), createBlock(Fragment, null, renderList(r.photos, (photo) => {
                                return openBlock(), createBlock("img", {
                                  key: photo.id,
                                  src: `/storage/${photo.path}`,
                                  alt: "Фото",
                                  class: "w-28 h-28 rounded-lg object-cover border shadow-sm cursor-pointer hover:scale-[1.03] transition",
                                  onClick: ($event) => openImage(photo.path)
                                }, null, 8, ["src", "onClick"]);
                              }), 128))
                            ])
                          ])) : createCommentVNode("", true)
                        ]),
                        createVNode(unref(_sfc_main$z), {
                          open: showImageModal.value,
                          "onUpdate:open": ($event) => showImageModal.value = $event
                        }, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$A), { class: "bg-black/60 fixed inset-0" }),
                            createVNode(unref(_sfc_main$B), { class: "bg-white dark:bg-gray-900 p-0 rounded-xl shadow-xl max-w-5xl w-full overflow-hidden" }, {
                              default: withCtx(() => [
                                createVNode("img", {
                                  src: selectedImage.value,
                                  alt: "Фото",
                                  class: "w-full h-auto object-contain max-h-[90vh]"
                                }, null, 8, ["src"])
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        }, 8, ["open", "onUpdate:open"]),
                        unref(user).role === "installer" && (!r.assigned_to || r.status === "new") ? (openBlock(), createBlock("div", {
                          key: 0,
                          class: "mt-4"
                        }, [
                          createVNode("button", {
                            onClick: ($event) => takeRequest(r.id),
                            class: "bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm"
                          }, " Взять в работу ", 8, ["onClick"])
                        ])) : createCommentVNode("", true),
                        unref(user).role === "installer" && r.assigned_to === unref(user).id && r.status === "assigned" ? (openBlock(), createBlock("div", {
                          key: 1,
                          class: "mt-4 flex flex-col gap-2"
                        }, [
                          withDirectives(createVNode("textarea", {
                            "onUpdate:modelValue": ($event) => commentInputs.value[r.id] = $event,
                            placeholder: "Комментарий при завершении",
                            class: "w-full rounded border px-3 py-2 text-sm text-gray-800",
                            rows: "3"
                          }, null, 8, ["onUpdate:modelValue"]), [
                            [vModelText, commentInputs.value[r.id]]
                          ]),
                          withDirectives(createVNode("input", {
                            "onUpdate:modelValue": ($event) => priceInputs.value[r.id] = $event,
                            type: "number",
                            step: "0.01",
                            placeholder: "Цена монтажа",
                            class: "w-full rounded border px-3 py-2 text-sm text-gray-800"
                          }, null, 8, ["onUpdate:modelValue"]), [
                            [vModelText, priceInputs.value[r.id]]
                          ]),
                          createVNode("button", {
                            onClick: ($event) => completeRequest(r.id),
                            class: "bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm self-start"
                          }, " Завершить ", 8, ["onClick"])
                        ])) : createCommentVNode("", true),
                        (unref(user).role === "admin" || unref(user).role === "engineer") && r.status === "done" ? (openBlock(), createBlock("div", {
                          key: 2,
                          class: "mt-3 space-y-2"
                        }, [
                          createVNode(unref(Link), {
                            href: `/requests/${r.id}/rate`,
                            class: "text-blue-600 underline text-sm hover:text-blue-800"
                          }, {
                            default: withCtx(() => [
                              createTextVNode(" Оценить монтажника ")
                            ]),
                            _: 2
                          }, 1032, ["href"]),
                          r.actions && r.actions.length && r.actions[0].installation_price !== null ? (openBlock(), createBlock("div", {
                            key: 0,
                            class: "mt-4 p-4 rounded-xl border bg-amber-50 border-amber-200/70 shadow-sm flex items-start gap-3"
                          }, [
                            createVNode("div", { class: "flex items-center justify-center w-10 h-10 rounded-lg bg-amber-100 text-amber-600" }, [
                              (openBlock(), createBlock("svg", {
                                xmlns: "http://www.w3.org/2000/svg",
                                class: "h-6 w-6",
                                fill: "none",
                                viewBox: "0 0 24 24",
                                stroke: "currentColor"
                              }, [
                                createVNode("path", {
                                  "stroke-linecap": "round",
                                  "stroke-linejoin": "round",
                                  "stroke-width": "2",
                                  d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8V4m0 12v4"
                                })
                              ]))
                            ]),
                            createVNode("div", null, [
                              createVNode("div", { class: "text-xs uppercase text-amber-700 font-semibold tracking-wide" }, " Стоимость монтажа "),
                              createVNode("div", {
                                class: "mt-1 text-lg font-semibold text-amber-900 flex items-baseline",
                                innerHTML: (() => {
                                  const formatted = Number(r.actions[0].installation_price).toLocaleString("ru-RU", {
                                    minimumFractionDigits: 2,
                                    maximumFractionDigits: 2
                                  }).replace(",", ".");
                                  const match = formatted.match(/(\d+)\.(\d{2})/);
                                  if (!match) return formatted + " BYN";
                                  const amount = match[1];
                                  const cents = match[2];
                                  return `
                                                ${amount}.
                                                <span class='text-xs align-super leading-none ml-0.5'>${cents}</span>
                                                <span class='ml-1 text-sm text-amber-700 font-medium'>BYN</span>
                                            `;
                                })()
                              }, null, 8, ["innerHTML"])
                            ])
                          ])) : createCommentVNode("", true),
                          ((_c = r.actions) == null ? void 0 : _c.some((a) => a.action === "completed" && a.note)) ? (openBlock(), createBlock("div", {
                            key: 1,
                            class: "mt-4 p-4 rounded-xl border bg-emerald-50 border-emerald-200/70 shadow-sm flex items-start gap-3"
                          }, [
                            createVNode("div", { class: "flex items-center justify-center w-10 h-10 rounded-lg bg-emerald-100 text-emerald-600" }, [
                              (openBlock(), createBlock("svg", {
                                xmlns: "http://www.w3.org/2000/svg",
                                class: "h-6 w-6",
                                fill: "none",
                                viewBox: "0 0 24 24",
                                stroke: "currentColor"
                              }, [
                                createVNode("path", {
                                  "stroke-linecap": "round",
                                  "stroke-linejoin": "round",
                                  "stroke-width": "2",
                                  d: "M8 10h.01M12 10h.01M16 10h.01M9 16h6m2 4H7a2 2 0 01-2-2V6a2 2 0 012-2h2l2-2h2l2 2h2a2 2 0 012 2v12a2 2 0 01-2 2z"
                                })
                              ]))
                            ]),
                            createVNode("div", null, [
                              createVNode("div", { class: "text-xs uppercase text-emerald-700 font-semibold tracking-wide" }, " Комментарий монтажника "),
                              createVNode("p", { class: "mt-1 whitespace-pre-line text-emerald-900" }, toDisplayString((_d = r.actions.find((a) => a.action === "completed")) == null ? void 0 : _d.note), 1)
                            ])
                          ])) : createCommentVNode("", true),
                          unref(user) && (unref(user).role === "admin" || unref(user).role === "engineer") && ((_e = r.actions) == null ? void 0 : _e.length) && r.actions.some((a) => a.action === "rejected") ? (openBlock(), createBlock("div", {
                            key: 2,
                            class: "mt-4 p-4 rounded-xl border bg-red-50 border-red-200/70 shadow-sm flex items-start gap-3"
                          }, [
                            createVNode("div", { class: "flex items-center justify-center w-10 h-10 rounded-lg bg-red-100 text-red-600" }, [
                              (openBlock(), createBlock("svg", {
                                xmlns: "http://www.w3.org/2000/svg",
                                class: "h-6 w-6",
                                fill: "none",
                                viewBox: "0 0 24 24",
                                stroke: "currentColor"
                              }, [
                                createVNode("path", {
                                  "stroke-linecap": "round",
                                  "stroke-linejoin": "round",
                                  "stroke-width": "2",
                                  d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8V4m0 12v4"
                                })
                              ]))
                            ]),
                            createVNode("div", null, [
                              createVNode("div", { class: "text-xs uppercase text-red-700 font-semibold tracking-wide" }, " Комментарий монтажника при отказе "),
                              createVNode("p", { class: "mt-1 whitespace-pre-line text-red-900" }, toDisplayString(((_f = r.actions.find((a) => a.action === "rejected")) == null ? void 0 : _f.note) ?? "—"), 1)
                            ])
                          ])) : createCommentVNode("", true)
                        ])) : createCommentVNode("", true),
                        unref(user).role === "admin" || unref(user).role === "engineer" ? (openBlock(), createBlock("div", {
                          key: 3,
                          class: "mt-4 flex gap-2"
                        }, [
                          createVNode(unref(Link), {
                            href: `/requests/${r.id}/edit`,
                            class: "px-4 py-2 text-sm font-semibold text-blue-700 bg-blue-50 rounded-md shadow-sm hover:bg-blue-100 hover:shadow-md transition cursor-pointer"
                          }, {
                            default: withCtx(() => [
                              createTextVNode(" Редактировать ")
                            ]),
                            _: 2
                          }, 1032, ["href"]),
                          createVNode("button", {
                            onClick: ($event) => deleteRequest(r.id),
                            class: "px-4 py-2 text-sm font-semibold text-red-700 bg-red-50 rounded-md shadow-sm hover:bg-red-100 hover:shadow-md transition cursor-pointer"
                          }, " Удалить ", 8, ["onClick"])
                        ])) : createCommentVNode("", true)
                      ], 2);
                    }), 128)),
                    createVNode(unref(_sfc_main$8), {
                      total: props.requests.total,
                      "items-per-page": props.requests.per_page,
                      "default-page": props.requests.current_page
                    }, {
                      default: withCtx(({ page, setPage }) => [
                        createVNode(unref(_sfc_main$7), null, {
                          default: withCtx(({ items }) => [
                            createVNode(unref(_sfc_main$1), {
                              disabled: !props.requests.prev_page_url,
                              onClick: ($event) => goToPage(props.requests.current_page - 1)
                            }, {
                              default: withCtx(() => [
                                createVNode("span", { class: "sr-only" }, "Previous"),
                                (openBlock(), createBlock("svg", {
                                  class: "h-4 w-4",
                                  fill: "none",
                                  stroke: "currentColor",
                                  viewBox: "0 0 24 24"
                                }, [
                                  createVNode("path", {
                                    "stroke-linecap": "round",
                                    "stroke-linejoin": "round",
                                    "stroke-width": "2",
                                    d: "M15 19l-7-7 7-7"
                                  })
                                ]))
                              ]),
                              _: 1
                            }, 8, ["disabled", "onClick"]),
                            (openBlock(true), createBlock(Fragment, null, renderList(items, (item) => {
                              return openBlock(), createBlock(Fragment, {
                                key: item.value
                              }, [
                                item.type === "page" ? (openBlock(), createBlock(unref(_sfc_main$4), {
                                  key: 0,
                                  value: item.value,
                                  "is-active": item.value === props.requests.current_page,
                                  onClick: ($event) => goToPage(item.value)
                                }, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(item.value), 1)
                                  ]),
                                  _: 2
                                }, 1032, ["value", "is-active", "onClick"])) : (openBlock(), createBlock(unref(_sfc_main$6), { key: 1 }))
                              ], 64);
                            }), 128)),
                            createVNode(unref(_sfc_main$2), {
                              disabled: !props.requests.next_page_url,
                              onClick: ($event) => goToPage(props.requests.current_page + 1)
                            }, {
                              default: withCtx(() => [
                                createVNode("span", { class: "sr-only" }, "Next"),
                                (openBlock(), createBlock("svg", {
                                  class: "h-4 w-4",
                                  fill: "none",
                                  stroke: "currentColor",
                                  viewBox: "0 0 24 24"
                                }, [
                                  createVNode("path", {
                                    "stroke-linecap": "round",
                                    "stroke-linejoin": "round",
                                    "stroke-width": "2",
                                    d: "M9 5l7 7-7 7"
                                  })
                                ]))
                              ]),
                              _: 1
                            }, 8, ["disabled", "onClick"])
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }, 8, ["total", "items-per-page", "default-page"])
                  ]))
                ])
              ])
            ];
          }
        }),
        _: 1
      }, _parent));
      _push(`<!--]-->`);
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/pages/requests/Index.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as default
};
