import { defineComponent, mergeProps, unref, useSSRContext, withCtx, createVNode, renderSlot, ref, createTextVNode, toDisplayString, createBlock, openBlock, Fragment, renderList, createCommentVNode } from "vue";
import { ssrRenderAttrs, ssrRenderClass, ssrRenderSlot, ssrRenderComponent, ssrRenderList, ssrInterpolate } from "vue/server-renderer";
import { usePage, Head, router } from "@inertiajs/vue3";
import { _ as _sfc_main$b } from "./AppLayout-DXKl-uoF.js";
import { _ as _sfc_main$c } from "./Input-CFG4Vy8n.js";
import { c as cn, _ as _sfc_main$d } from "./AppLogoIcon-DhmQfNIw.js";
import { reactiveOmit } from "@vueuse/core";
import { _ as _sfc_main$e, a as _sfc_main$f, b as _sfc_main$g, c as _sfc_main$h, d as _sfc_main$i, e as _sfc_main$j, f as _sfc_main$k } from "./SelectValue-Bls_QTA2.js";
import { _ as _sfc_main$a } from "./Sonner-DWWNv2jt.js";
import { toast } from "vue-sonner";
/* empty css               */
import "class-variance-authority";
import "reka-ui";
import "lucide-vue-next";
import "clsx";
import "tailwind-merge";
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
  __name: "Table",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<div${ssrRenderAttrs(mergeProps({
        "data-slot": "table-container",
        class: "relative w-full overflow-auto"
      }, _attrs))}><table data-slot="table" class="${ssrRenderClass(unref(cn)("w-full caption-bottom text-sm", props.class))}">`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</table></div>`);
    };
  }
});
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/table/Table.vue");
  return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
};
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
  __name: "TableBody",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<tbody${ssrRenderAttrs(mergeProps({
        "data-slot": "table-body",
        class: unref(cn)("[&_tr:last-child]:border-0", props.class)
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</tbody>`);
    };
  }
});
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/table/TableBody.vue");
  return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
};
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
  __name: "TableCaption",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<caption${ssrRenderAttrs(mergeProps({
        "data-slot": "table-caption",
        class: unref(cn)("text-muted-foreground mt-4 text-sm", props.class)
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</caption>`);
    };
  }
});
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/table/TableCaption.vue");
  return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
};
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
  __name: "TableCell",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<td${ssrRenderAttrs(mergeProps({
        "data-slot": "table-cell",
        class: unref(cn)(
          "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
          props.class
        )
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</td>`);
    };
  }
});
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/table/TableCell.vue");
  return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
};
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
  __name: "TableRow",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<tr${ssrRenderAttrs(mergeProps({
        "data-slot": "table-row",
        class: unref(cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", props.class)
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</tr>`);
    };
  }
});
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/table/TableRow.vue");
  return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
};
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
  __name: "TableEmpty",
  __ssrInlineRender: true,
  props: {
    class: {},
    colspan: { default: 1 }
  },
  setup(__props) {
    const props = __props;
    const delegatedProps = reactiveOmit(props, "class");
    return (_ctx, _push, _parent, _attrs) => {
      _push(ssrRenderComponent(_sfc_main$5, _attrs, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(ssrRenderComponent(_sfc_main$6, mergeProps({
              class: unref(cn)(
                "p-4 whitespace-nowrap align-middle text-sm text-foreground",
                props.class
              )
            }, unref(delegatedProps)), {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`<div class="flex items-center justify-center py-10"${_scopeId2}>`);
                  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push3, _parent3, _scopeId2);
                  _push3(`</div>`);
                } else {
                  return [
                    createVNode("div", { class: "flex items-center justify-center py-10" }, [
                      renderSlot(_ctx.$slots, "default")
                    ])
                  ];
                }
              }),
              _: 3
            }, _parent2, _scopeId));
          } else {
            return [
              createVNode(_sfc_main$6, mergeProps({
                class: unref(cn)(
                  "p-4 whitespace-nowrap align-middle text-sm text-foreground",
                  props.class
                )
              }, unref(delegatedProps)), {
                default: withCtx(() => [
                  createVNode("div", { class: "flex items-center justify-center py-10" }, [
                    renderSlot(_ctx.$slots, "default")
                  ])
                ]),
                _: 3
              }, 16, ["class"])
            ];
          }
        }),
        _: 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/table/TableEmpty.vue");
  return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
};
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
  __name: "TableFooter",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<tfoot${ssrRenderAttrs(mergeProps({
        "data-slot": "table-footer",
        class: unref(cn)("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", props.class)
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</tfoot>`);
    };
  }
});
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/table/TableFooter.vue");
  return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
};
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
  __name: "TableHead",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<th${ssrRenderAttrs(mergeProps({
        "data-slot": "table-head",
        class: unref(cn)("text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", props.class)
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</th>`);
    };
  }
});
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/table/TableHead.vue");
  return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
};
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
  __name: "TableHeader",
  __ssrInlineRender: true,
  props: {
    class: {}
  },
  setup(__props) {
    const props = __props;
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<thead${ssrRenderAttrs(mergeProps({
        "data-slot": "table-header",
        class: unref(cn)("[&_tr]:border-b", props.class)
      }, _attrs))}>`);
      ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
      _push(`</thead>`);
    };
  }
});
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/table/TableHeader.vue");
  return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "Consumables",
  __ssrInlineRender: true,
  setup(__props) {
    const page = usePage();
    const consumables = ref(page.props.consumables ?? []);
    const installers = ref(page.props.installers ?? []);
    const logs = ref(page.props.logs ?? []);
    const installerStocks = ref(page.props.installerStocks ?? []);
    const newConsumable = ref({ name: "", unit: "", stock: 0 });
    const addConsumable = () => {
      if (!newConsumable.value.name) return;
      router.post("/consumables", newConsumable.value, {
        onSuccess: () => {
          newConsumable.value = { name: "", unit: "", stock: 0 };
          toast.success("Расходник добавлен");
        },
        onError: () => toast.error("Ошибка при добавлении расходника")
      });
    };
    const updateConsumable = (c) => {
      router.put(`/consumables/${c.id}`, c, {
        onSuccess: () => toast.success("Расходник обновлён"),
        onError: () => toast.error("Ошибка при обновлении расходника")
      });
    };
    const deleteConsumable = (c) => {
      if (confirm("Удалить расходник?")) {
        router.delete(`/consumables/${c.id}`, {
          onSuccess: () => {
            consumables.value = consumables.value.filter((item) => item.id !== c.id);
            toast.success("Расходник удалён");
          },
          onError: () => toast.error("Ошибка при удалении расходника")
        });
      }
    };
    const adjust = (c, delta) => {
      router.post(`/consumables/${c.id}/adjust`, { delta }, {
        onSuccess: () => toast.success("Остаток изменён"),
        onError: () => toast.error("Ошибка при изменении остатка")
      });
    };
    const showModal = ref(false);
    const selectedConsumable = ref(null);
    const selectedInstaller = ref(null);
    const quantity = ref(1);
    const openModal = (c_id) => {
      selectedConsumable.value = c_id;
      selectedInstaller.value = null;
      quantity.value = 1;
      showModal.value = true;
    };
    const refill = () => {
      if (!selectedConsumable.value) return toast.error("Ошибка: расходник не выбран");
      if (!selectedInstaller.value) return toast.error("Выберите монтажника");
      router.post(`/consumables/${selectedInstaller.value}/refill`, {
        consumable_id: selectedConsumable.value,
        quantity: quantity.value
      }, {
        onSuccess: () => {
          toast.success("Выдано монтажнику");
          showModal.value = false;
        },
        onError: () => toast.error("Ошибка при выдаче")
      });
    };
    const typeLabels = {
      issue: "Выдан",
      return: "Возврат",
      adjust: "Корректировка",
      create: "Создание",
      delete: "Удаление",
      central_issue: "Списано с центрального склада",
      personal_issue: "Списано с личного склада"
    };
    const breadcrumbs = [
      { title: "Склад", href: "/consumables" }
    ];
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<!--[-->`);
      _push(ssrRenderComponent(unref(Head), { title: "Склад" }, null, _parent));
      _push(ssrRenderComponent(unref(_sfc_main$a), null, null, _parent));
      _push(ssrRenderComponent(_sfc_main$b, { breadcrumbs }, {
        default: withCtx((_, _push2, _parent2, _scopeId) => {
          if (_push2) {
            _push2(`<div class="p-6"${_scopeId}><h1 class="text-2xl font-bold mb-4"${_scopeId}>Склад</h1>`);
            _push2(ssrRenderComponent(unref(_sfc_main$9), { class: "mb-10" }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(unref(_sfc_main$1), null, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(ssrRenderComponent(unref(_sfc_main$5), null, {
                          default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                            if (_push5) {
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Монтажник`);
                                  } else {
                                    return [
                                      createTextVNode("Монтажник")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Расходник`);
                                  } else {
                                    return [
                                      createTextVNode("Расходник")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Центральный склад`);
                                  } else {
                                    return [
                                      createTextVNode("Центральный склад")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Личный склад`);
                                  } else {
                                    return [
                                      createTextVNode("Личный склад")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                            } else {
                              return [
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Монтажник")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Расходник")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Центральный склад")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Личный склад")
                                  ]),
                                  _: 1
                                })
                              ];
                            }
                          }),
                          _: 1
                        }, _parent4, _scopeId3));
                      } else {
                        return [
                          createVNode(unref(_sfc_main$5), null, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Монтажник")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Расходник")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Центральный склад")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Личный склад")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          })
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                  _push3(ssrRenderComponent(unref(_sfc_main$8), null, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(`<!--[-->`);
                        ssrRenderList(installerStocks.value, (installer) => {
                          _push4(ssrRenderComponent(unref(_sfc_main$5), {
                            key: installer.installer_id
                          }, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`${ssrInterpolate(installer.installer_name)}`);
                                    } else {
                                      return [
                                        createTextVNode(toDisplayString(installer.installer_name), 1)
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`<!--[-->`);
                                      ssrRenderList(installer.stocks, (s) => {
                                        _push6(`<div${_scopeId5}>${ssrInterpolate(s.name)}</div>`);
                                      });
                                      _push6(`<!--]-->`);
                                    } else {
                                      return [
                                        (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                          return openBlock(), createBlock("div", {
                                            key: s.id
                                          }, toDisplayString(s.name), 1);
                                        }), 128))
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`<!--[-->`);
                                      ssrRenderList(installer.stocks, (s) => {
                                        _push6(`<div${_scopeId5}>${ssrInterpolate(s.central_stock)}</div>`);
                                      });
                                      _push6(`<!--]-->`);
                                    } else {
                                      return [
                                        (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                          return openBlock(), createBlock("div", {
                                            key: s.id
                                          }, toDisplayString(s.central_stock), 1);
                                        }), 128))
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`<!--[-->`);
                                      ssrRenderList(installer.stocks, (s) => {
                                        _push6(`<div${_scopeId5}>${ssrInterpolate(s.personal_stock)}</div>`);
                                      });
                                      _push6(`<!--]-->`);
                                    } else {
                                      return [
                                        (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                          return openBlock(), createBlock("div", {
                                            key: s.id
                                          }, toDisplayString(s.personal_stock), 1);
                                        }), 128))
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                              } else {
                                return [
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(installer.installer_name), 1)
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                        return openBlock(), createBlock("div", {
                                          key: s.id
                                        }, toDisplayString(s.name), 1);
                                      }), 128))
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                        return openBlock(), createBlock("div", {
                                          key: s.id
                                        }, toDisplayString(s.central_stock), 1);
                                      }), 128))
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                        return openBlock(), createBlock("div", {
                                          key: s.id
                                        }, toDisplayString(s.personal_stock), 1);
                                      }), 128))
                                    ]),
                                    _: 2
                                  }, 1024)
                                ];
                              }
                            }),
                            _: 2
                          }, _parent4, _scopeId3));
                        });
                        _push4(`<!--]-->`);
                      } else {
                        return [
                          (openBlock(true), createBlock(Fragment, null, renderList(installerStocks.value, (installer) => {
                            return openBlock(), createBlock(unref(_sfc_main$5), {
                              key: installer.installer_id
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(installer.installer_name), 1)
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                      return openBlock(), createBlock("div", {
                                        key: s.id
                                      }, toDisplayString(s.name), 1);
                                    }), 128))
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                      return openBlock(), createBlock("div", {
                                        key: s.id
                                      }, toDisplayString(s.central_stock), 1);
                                    }), 128))
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                      return openBlock(), createBlock("div", {
                                        key: s.id
                                      }, toDisplayString(s.personal_stock), 1);
                                    }), 128))
                                  ]),
                                  _: 2
                                }, 1024)
                              ]),
                              _: 2
                            }, 1024);
                          }), 128))
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(unref(_sfc_main$1), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$5), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Монтажник")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Расходник")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Центральный склад")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Личный склад")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$8), null, {
                      default: withCtx(() => [
                        (openBlock(true), createBlock(Fragment, null, renderList(installerStocks.value, (installer) => {
                          return openBlock(), createBlock(unref(_sfc_main$5), {
                            key: installer.installer_id
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(installer.installer_name), 1)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                    return openBlock(), createBlock("div", {
                                      key: s.id
                                    }, toDisplayString(s.name), 1);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                    return openBlock(), createBlock("div", {
                                      key: s.id
                                    }, toDisplayString(s.central_stock), 1);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                    return openBlock(), createBlock("div", {
                                      key: s.id
                                    }, toDisplayString(s.personal_stock), 1);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024)
                            ]),
                            _: 2
                          }, 1024);
                        }), 128))
                      ]),
                      _: 1
                    })
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`<div class="mb-4 flex gap-2"${_scopeId}>`);
            _push2(ssrRenderComponent(unref(_sfc_main$c), {
              modelValue: newConsumable.value.name,
              "onUpdate:modelValue": ($event) => newConsumable.value.name = $event,
              placeholder: "Название"
            }, null, _parent2, _scopeId));
            _push2(ssrRenderComponent(unref(_sfc_main$c), {
              modelValue: newConsumable.value.unit,
              "onUpdate:modelValue": ($event) => newConsumable.value.unit = $event,
              placeholder: "Ед. изм."
            }, null, _parent2, _scopeId));
            _push2(ssrRenderComponent(unref(_sfc_main$c), {
              modelValue: newConsumable.value.stock,
              "onUpdate:modelValue": ($event) => newConsumable.value.stock = $event,
              modelModifiers: { number: true },
              type: "number",
              placeholder: "Остаток",
              class: "w-24"
            }, null, _parent2, _scopeId));
            _push2(ssrRenderComponent(unref(_sfc_main$d), { onClick: addConsumable }, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(`Добавить`);
                } else {
                  return [
                    createTextVNode("Добавить")
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`</div>`);
            _push2(ssrRenderComponent(unref(_sfc_main$9), null, {
              default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                if (_push3) {
                  _push3(ssrRenderComponent(unref(_sfc_main$1), null, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(ssrRenderComponent(unref(_sfc_main$5), null, {
                          default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                            if (_push5) {
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`ID`);
                                  } else {
                                    return [
                                      createTextVNode("ID")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Название`);
                                  } else {
                                    return [
                                      createTextVNode("Название")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Ед.`);
                                  } else {
                                    return [
                                      createTextVNode("Ед.")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Остаток`);
                                  } else {
                                    return [
                                      createTextVNode("Остаток")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                              _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                  if (_push6) {
                                    _push6(`Действия`);
                                  } else {
                                    return [
                                      createTextVNode("Действия")
                                    ];
                                  }
                                }),
                                _: 1
                              }, _parent5, _scopeId4));
                            } else {
                              return [
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("ID")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Название")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Ед.")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Остаток")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Действия")
                                  ]),
                                  _: 1
                                })
                              ];
                            }
                          }),
                          _: 1
                        }, _parent4, _scopeId3));
                      } else {
                        return [
                          createVNode(unref(_sfc_main$5), null, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("ID")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Название")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Ед.")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Остаток")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Действия")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          })
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                  _push3(ssrRenderComponent(unref(_sfc_main$8), null, {
                    default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                      if (_push4) {
                        _push4(`<!--[-->`);
                        ssrRenderList(consumables.value, (c) => {
                          _push4(ssrRenderComponent(unref(_sfc_main$5), {
                            key: c.id
                          }, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`${ssrInterpolate(c.id)}`);
                                    } else {
                                      return [
                                        createTextVNode(toDisplayString(c.id), 1)
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(ssrRenderComponent(unref(_sfc_main$c), {
                                        modelValue: c.name,
                                        "onUpdate:modelValue": ($event) => c.name = $event
                                      }, null, _parent6, _scopeId5));
                                    } else {
                                      return [
                                        createVNode(unref(_sfc_main$c), {
                                          modelValue: c.name,
                                          "onUpdate:modelValue": ($event) => c.name = $event
                                        }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(ssrRenderComponent(unref(_sfc_main$c), {
                                        modelValue: c.unit,
                                        "onUpdate:modelValue": ($event) => c.unit = $event
                                      }, null, _parent6, _scopeId5));
                                    } else {
                                      return [
                                        createVNode(unref(_sfc_main$c), {
                                          modelValue: c.unit,
                                          "onUpdate:modelValue": ($event) => c.unit = $event
                                        }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`<div class="flex items-center gap-2"${_scopeId5}>`);
                                      _push6(ssrRenderComponent(unref(_sfc_main$d), {
                                        variant: "destructive",
                                        size: "sm",
                                        onClick: ($event) => adjust(c, -1)
                                      }, {
                                        default: withCtx((_6, _push7, _parent7, _scopeId6) => {
                                          if (_push7) {
                                            _push7(`-`);
                                          } else {
                                            return [
                                              createTextVNode("-")
                                            ];
                                          }
                                        }),
                                        _: 2
                                      }, _parent6, _scopeId5));
                                      _push6(ssrRenderComponent(unref(_sfc_main$c), {
                                        modelValue: c.stock,
                                        "onUpdate:modelValue": ($event) => c.stock = $event,
                                        modelModifiers: { number: true },
                                        type: "number",
                                        class: "w-20 text-center"
                                      }, null, _parent6, _scopeId5));
                                      _push6(ssrRenderComponent(unref(_sfc_main$d), {
                                        variant: "success",
                                        size: "sm",
                                        onClick: ($event) => adjust(c, 1)
                                      }, {
                                        default: withCtx((_6, _push7, _parent7, _scopeId6) => {
                                          if (_push7) {
                                            _push7(`+`);
                                          } else {
                                            return [
                                              createTextVNode("+")
                                            ];
                                          }
                                        }),
                                        _: 2
                                      }, _parent6, _scopeId5));
                                      _push6(`</div>`);
                                    } else {
                                      return [
                                        createVNode("div", { class: "flex items-center gap-2" }, [
                                          createVNode(unref(_sfc_main$d), {
                                            variant: "destructive",
                                            size: "sm",
                                            onClick: ($event) => adjust(c, -1)
                                          }, {
                                            default: withCtx(() => [
                                              createTextVNode("-")
                                            ]),
                                            _: 2
                                          }, 1032, ["onClick"]),
                                          createVNode(unref(_sfc_main$c), {
                                            modelValue: c.stock,
                                            "onUpdate:modelValue": ($event) => c.stock = $event,
                                            modelModifiers: { number: true },
                                            type: "number",
                                            class: "w-20 text-center"
                                          }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                          createVNode(unref(_sfc_main$d), {
                                            variant: "success",
                                            size: "sm",
                                            onClick: ($event) => adjust(c, 1)
                                          }, {
                                            default: withCtx(() => [
                                              createTextVNode("+")
                                            ]),
                                            _: 2
                                          }, 1032, ["onClick"])
                                        ])
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`<div class="flex gap-2"${_scopeId5}>`);
                                      _push6(ssrRenderComponent(unref(_sfc_main$d), {
                                        variant: "outline",
                                        size: "sm",
                                        onClick: ($event) => updateConsumable(c)
                                      }, {
                                        default: withCtx((_6, _push7, _parent7, _scopeId6) => {
                                          if (_push7) {
                                            _push7(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save-icon lucide-save"${_scopeId6}><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"${_scopeId6}></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"${_scopeId6}></path><path d="M7 3v4a1 1 0 0 0 1 1h7"${_scopeId6}></path></svg>`);
                                          } else {
                                            return [
                                              (openBlock(), createBlock("svg", {
                                                xmlns: "http://www.w3.org/2000/svg",
                                                width: "24",
                                                height: "24",
                                                viewBox: "0 0 24 24",
                                                fill: "none",
                                                stroke: "currentColor",
                                                "stroke-width": "2",
                                                "stroke-linecap": "round",
                                                "stroke-linejoin": "round",
                                                class: "lucide lucide-save-icon lucide-save"
                                              }, [
                                                createVNode("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
                                                createVNode("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
                                                createVNode("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
                                              ]))
                                            ];
                                          }
                                        }),
                                        _: 2
                                      }, _parent6, _scopeId5));
                                      _push6(ssrRenderComponent(unref(_sfc_main$d), {
                                        variant: "secondary",
                                        size: "sm",
                                        onClick: ($event) => openModal(c.id)
                                      }, {
                                        default: withCtx((_6, _push7, _parent7, _scopeId6) => {
                                          if (_push7) {
                                            _push7(` ➜ Выдать монтажнику `);
                                          } else {
                                            return [
                                              createTextVNode(" ➜ Выдать монтажнику ")
                                            ];
                                          }
                                        }),
                                        _: 2
                                      }, _parent6, _scopeId5));
                                      _push6(ssrRenderComponent(unref(_sfc_main$d), {
                                        variant: "destructive",
                                        size: "sm",
                                        onClick: ($event) => deleteConsumable(c)
                                      }, {
                                        default: withCtx((_6, _push7, _parent7, _scopeId6) => {
                                          if (_push7) {
                                            _push7(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-icon lucide-trash"${_scopeId6}><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"${_scopeId6}></path><path d="M3 6h18"${_scopeId6}></path><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"${_scopeId6}></path></svg>`);
                                          } else {
                                            return [
                                              (openBlock(), createBlock("svg", {
                                                xmlns: "http://www.w3.org/2000/svg",
                                                width: "24",
                                                height: "24",
                                                viewBox: "0 0 24 24",
                                                fill: "none",
                                                stroke: "currentColor",
                                                "stroke-width": "2",
                                                "stroke-linecap": "round",
                                                "stroke-linejoin": "round",
                                                class: "lucide lucide-trash-icon lucide-trash"
                                              }, [
                                                createVNode("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
                                                createVNode("path", { d: "M3 6h18" }),
                                                createVNode("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
                                              ]))
                                            ];
                                          }
                                        }),
                                        _: 2
                                      }, _parent6, _scopeId5));
                                      _push6(`</div>`);
                                    } else {
                                      return [
                                        createVNode("div", { class: "flex gap-2" }, [
                                          createVNode(unref(_sfc_main$d), {
                                            variant: "outline",
                                            size: "sm",
                                            onClick: ($event) => updateConsumable(c)
                                          }, {
                                            default: withCtx(() => [
                                              (openBlock(), createBlock("svg", {
                                                xmlns: "http://www.w3.org/2000/svg",
                                                width: "24",
                                                height: "24",
                                                viewBox: "0 0 24 24",
                                                fill: "none",
                                                stroke: "currentColor",
                                                "stroke-width": "2",
                                                "stroke-linecap": "round",
                                                "stroke-linejoin": "round",
                                                class: "lucide lucide-save-icon lucide-save"
                                              }, [
                                                createVNode("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
                                                createVNode("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
                                                createVNode("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
                                              ]))
                                            ]),
                                            _: 2
                                          }, 1032, ["onClick"]),
                                          createVNode(unref(_sfc_main$d), {
                                            variant: "secondary",
                                            size: "sm",
                                            onClick: ($event) => openModal(c.id)
                                          }, {
                                            default: withCtx(() => [
                                              createTextVNode(" ➜ Выдать монтажнику ")
                                            ]),
                                            _: 2
                                          }, 1032, ["onClick"]),
                                          createVNode(unref(_sfc_main$d), {
                                            variant: "destructive",
                                            size: "sm",
                                            onClick: ($event) => deleteConsumable(c)
                                          }, {
                                            default: withCtx(() => [
                                              (openBlock(), createBlock("svg", {
                                                xmlns: "http://www.w3.org/2000/svg",
                                                width: "24",
                                                height: "24",
                                                viewBox: "0 0 24 24",
                                                fill: "none",
                                                stroke: "currentColor",
                                                "stroke-width": "2",
                                                "stroke-linecap": "round",
                                                "stroke-linejoin": "round",
                                                class: "lucide lucide-trash-icon lucide-trash"
                                              }, [
                                                createVNode("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
                                                createVNode("path", { d: "M3 6h18" }),
                                                createVNode("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
                                              ]))
                                            ]),
                                            _: 2
                                          }, 1032, ["onClick"])
                                        ])
                                      ];
                                    }
                                  }),
                                  _: 2
                                }, _parent5, _scopeId4));
                              } else {
                                return [
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(c.id), 1)
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createVNode(unref(_sfc_main$c), {
                                        modelValue: c.name,
                                        "onUpdate:modelValue": ($event) => c.name = $event
                                      }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createVNode(unref(_sfc_main$c), {
                                        modelValue: c.unit,
                                        "onUpdate:modelValue": ($event) => c.unit = $event
                                      }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createVNode("div", { class: "flex items-center gap-2" }, [
                                        createVNode(unref(_sfc_main$d), {
                                          variant: "destructive",
                                          size: "sm",
                                          onClick: ($event) => adjust(c, -1)
                                        }, {
                                          default: withCtx(() => [
                                            createTextVNode("-")
                                          ]),
                                          _: 2
                                        }, 1032, ["onClick"]),
                                        createVNode(unref(_sfc_main$c), {
                                          modelValue: c.stock,
                                          "onUpdate:modelValue": ($event) => c.stock = $event,
                                          modelModifiers: { number: true },
                                          type: "number",
                                          class: "w-20 text-center"
                                        }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                        createVNode(unref(_sfc_main$d), {
                                          variant: "success",
                                          size: "sm",
                                          onClick: ($event) => adjust(c, 1)
                                        }, {
                                          default: withCtx(() => [
                                            createTextVNode("+")
                                          ]),
                                          _: 2
                                        }, 1032, ["onClick"])
                                      ])
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createVNode("div", { class: "flex gap-2" }, [
                                        createVNode(unref(_sfc_main$d), {
                                          variant: "outline",
                                          size: "sm",
                                          onClick: ($event) => updateConsumable(c)
                                        }, {
                                          default: withCtx(() => [
                                            (openBlock(), createBlock("svg", {
                                              xmlns: "http://www.w3.org/2000/svg",
                                              width: "24",
                                              height: "24",
                                              viewBox: "0 0 24 24",
                                              fill: "none",
                                              stroke: "currentColor",
                                              "stroke-width": "2",
                                              "stroke-linecap": "round",
                                              "stroke-linejoin": "round",
                                              class: "lucide lucide-save-icon lucide-save"
                                            }, [
                                              createVNode("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
                                              createVNode("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
                                              createVNode("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
                                            ]))
                                          ]),
                                          _: 2
                                        }, 1032, ["onClick"]),
                                        createVNode(unref(_sfc_main$d), {
                                          variant: "secondary",
                                          size: "sm",
                                          onClick: ($event) => openModal(c.id)
                                        }, {
                                          default: withCtx(() => [
                                            createTextVNode(" ➜ Выдать монтажнику ")
                                          ]),
                                          _: 2
                                        }, 1032, ["onClick"]),
                                        createVNode(unref(_sfc_main$d), {
                                          variant: "destructive",
                                          size: "sm",
                                          onClick: ($event) => deleteConsumable(c)
                                        }, {
                                          default: withCtx(() => [
                                            (openBlock(), createBlock("svg", {
                                              xmlns: "http://www.w3.org/2000/svg",
                                              width: "24",
                                              height: "24",
                                              viewBox: "0 0 24 24",
                                              fill: "none",
                                              stroke: "currentColor",
                                              "stroke-width": "2",
                                              "stroke-linecap": "round",
                                              "stroke-linejoin": "round",
                                              class: "lucide lucide-trash-icon lucide-trash"
                                            }, [
                                              createVNode("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
                                              createVNode("path", { d: "M3 6h18" }),
                                              createVNode("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
                                            ]))
                                          ]),
                                          _: 2
                                        }, 1032, ["onClick"])
                                      ])
                                    ]),
                                    _: 2
                                  }, 1024)
                                ];
                              }
                            }),
                            _: 2
                          }, _parent4, _scopeId3));
                        });
                        _push4(`<!--]-->`);
                      } else {
                        return [
                          (openBlock(true), createBlock(Fragment, null, renderList(consumables.value, (c) => {
                            return openBlock(), createBlock(unref(_sfc_main$5), {
                              key: c.id
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(c.id), 1)
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createVNode(unref(_sfc_main$c), {
                                      modelValue: c.name,
                                      "onUpdate:modelValue": ($event) => c.name = $event
                                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createVNode(unref(_sfc_main$c), {
                                      modelValue: c.unit,
                                      "onUpdate:modelValue": ($event) => c.unit = $event
                                    }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createVNode("div", { class: "flex items-center gap-2" }, [
                                      createVNode(unref(_sfc_main$d), {
                                        variant: "destructive",
                                        size: "sm",
                                        onClick: ($event) => adjust(c, -1)
                                      }, {
                                        default: withCtx(() => [
                                          createTextVNode("-")
                                        ]),
                                        _: 2
                                      }, 1032, ["onClick"]),
                                      createVNode(unref(_sfc_main$c), {
                                        modelValue: c.stock,
                                        "onUpdate:modelValue": ($event) => c.stock = $event,
                                        modelModifiers: { number: true },
                                        type: "number",
                                        class: "w-20 text-center"
                                      }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                      createVNode(unref(_sfc_main$d), {
                                        variant: "success",
                                        size: "sm",
                                        onClick: ($event) => adjust(c, 1)
                                      }, {
                                        default: withCtx(() => [
                                          createTextVNode("+")
                                        ]),
                                        _: 2
                                      }, 1032, ["onClick"])
                                    ])
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createVNode("div", { class: "flex gap-2" }, [
                                      createVNode(unref(_sfc_main$d), {
                                        variant: "outline",
                                        size: "sm",
                                        onClick: ($event) => updateConsumable(c)
                                      }, {
                                        default: withCtx(() => [
                                          (openBlock(), createBlock("svg", {
                                            xmlns: "http://www.w3.org/2000/svg",
                                            width: "24",
                                            height: "24",
                                            viewBox: "0 0 24 24",
                                            fill: "none",
                                            stroke: "currentColor",
                                            "stroke-width": "2",
                                            "stroke-linecap": "round",
                                            "stroke-linejoin": "round",
                                            class: "lucide lucide-save-icon lucide-save"
                                          }, [
                                            createVNode("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
                                            createVNode("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
                                            createVNode("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
                                          ]))
                                        ]),
                                        _: 2
                                      }, 1032, ["onClick"]),
                                      createVNode(unref(_sfc_main$d), {
                                        variant: "secondary",
                                        size: "sm",
                                        onClick: ($event) => openModal(c.id)
                                      }, {
                                        default: withCtx(() => [
                                          createTextVNode(" ➜ Выдать монтажнику ")
                                        ]),
                                        _: 2
                                      }, 1032, ["onClick"]),
                                      createVNode(unref(_sfc_main$d), {
                                        variant: "destructive",
                                        size: "sm",
                                        onClick: ($event) => deleteConsumable(c)
                                      }, {
                                        default: withCtx(() => [
                                          (openBlock(), createBlock("svg", {
                                            xmlns: "http://www.w3.org/2000/svg",
                                            width: "24",
                                            height: "24",
                                            viewBox: "0 0 24 24",
                                            fill: "none",
                                            stroke: "currentColor",
                                            "stroke-width": "2",
                                            "stroke-linecap": "round",
                                            "stroke-linejoin": "round",
                                            class: "lucide lucide-trash-icon lucide-trash"
                                          }, [
                                            createVNode("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
                                            createVNode("path", { d: "M3 6h18" }),
                                            createVNode("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
                                          ]))
                                        ]),
                                        _: 2
                                      }, 1032, ["onClick"])
                                    ])
                                  ]),
                                  _: 2
                                }, 1024)
                              ]),
                              _: 2
                            }, 1024);
                          }), 128))
                        ];
                      }
                    }),
                    _: 1
                  }, _parent3, _scopeId2));
                } else {
                  return [
                    createVNode(unref(_sfc_main$1), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$5), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("ID")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Название")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Ед.")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Остаток")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Действия")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$8), null, {
                      default: withCtx(() => [
                        (openBlock(true), createBlock(Fragment, null, renderList(consumables.value, (c) => {
                          return openBlock(), createBlock(unref(_sfc_main$5), {
                            key: c.id
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(c.id), 1)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode(unref(_sfc_main$c), {
                                    modelValue: c.name,
                                    "onUpdate:modelValue": ($event) => c.name = $event
                                  }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode(unref(_sfc_main$c), {
                                    modelValue: c.unit,
                                    "onUpdate:modelValue": ($event) => c.unit = $event
                                  }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode("div", { class: "flex items-center gap-2" }, [
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "destructive",
                                      size: "sm",
                                      onClick: ($event) => adjust(c, -1)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode("-")
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"]),
                                    createVNode(unref(_sfc_main$c), {
                                      modelValue: c.stock,
                                      "onUpdate:modelValue": ($event) => c.stock = $event,
                                      modelModifiers: { number: true },
                                      type: "number",
                                      class: "w-20 text-center"
                                    }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "success",
                                      size: "sm",
                                      onClick: ($event) => adjust(c, 1)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode("+")
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"])
                                  ])
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode("div", { class: "flex gap-2" }, [
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "outline",
                                      size: "sm",
                                      onClick: ($event) => updateConsumable(c)
                                    }, {
                                      default: withCtx(() => [
                                        (openBlock(), createBlock("svg", {
                                          xmlns: "http://www.w3.org/2000/svg",
                                          width: "24",
                                          height: "24",
                                          viewBox: "0 0 24 24",
                                          fill: "none",
                                          stroke: "currentColor",
                                          "stroke-width": "2",
                                          "stroke-linecap": "round",
                                          "stroke-linejoin": "round",
                                          class: "lucide lucide-save-icon lucide-save"
                                        }, [
                                          createVNode("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
                                          createVNode("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
                                          createVNode("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
                                        ]))
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"]),
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "secondary",
                                      size: "sm",
                                      onClick: ($event) => openModal(c.id)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode(" ➜ Выдать монтажнику ")
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"]),
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "destructive",
                                      size: "sm",
                                      onClick: ($event) => deleteConsumable(c)
                                    }, {
                                      default: withCtx(() => [
                                        (openBlock(), createBlock("svg", {
                                          xmlns: "http://www.w3.org/2000/svg",
                                          width: "24",
                                          height: "24",
                                          viewBox: "0 0 24 24",
                                          fill: "none",
                                          stroke: "currentColor",
                                          "stroke-width": "2",
                                          "stroke-linecap": "round",
                                          "stroke-linejoin": "round",
                                          class: "lucide lucide-trash-icon lucide-trash"
                                        }, [
                                          createVNode("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
                                          createVNode("path", { d: "M3 6h18" }),
                                          createVNode("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
                                        ]))
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"])
                                  ])
                                ]),
                                _: 2
                              }, 1024)
                            ]),
                            _: 2
                          }, 1024);
                        }), 128))
                      ]),
                      _: 1
                    })
                  ];
                }
              }),
              _: 1
            }, _parent2, _scopeId));
            _push2(`<h2 class="text-xl font-bold mt-10 mb-4"${_scopeId}>История движений</h2>`);
            if (logs.value.length === 0) {
              _push2(`<div class="text-gray-500"${_scopeId}>Истории пока нет</div>`);
            } else {
              _push2(ssrRenderComponent(unref(_sfc_main$9), null, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$1), null, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$5), null, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Дата`);
                                    } else {
                                      return [
                                        createTextVNode("Дата")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Расходник`);
                                    } else {
                                      return [
                                        createTextVNode("Расходник")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Операция`);
                                    } else {
                                      return [
                                        createTextVNode("Операция")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Кол-во`);
                                    } else {
                                      return [
                                        createTextVNode("Кол-во")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(ssrRenderComponent(unref(_sfc_main$2), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Монтажник`);
                                    } else {
                                      return [
                                        createTextVNode("Монтажник")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                              } else {
                                return [
                                  createVNode(unref(_sfc_main$2), null, {
                                    default: withCtx(() => [
                                      createTextVNode("Дата")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$2), null, {
                                    default: withCtx(() => [
                                      createTextVNode("Расходник")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$2), null, {
                                    default: withCtx(() => [
                                      createTextVNode("Операция")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$2), null, {
                                    default: withCtx(() => [
                                      createTextVNode("Кол-во")
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(_sfc_main$2), null, {
                                    default: withCtx(() => [
                                      createTextVNode("Монтажник")
                                    ]),
                                    _: 1
                                  })
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$5), null, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Дата")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Расходник")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Операция")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Кол-во")
                                  ]),
                                  _: 1
                                }),
                                createVNode(unref(_sfc_main$2), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Монтажник")
                                  ]),
                                  _: 1
                                })
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(unref(_sfc_main$8), null, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(`<!--[-->`);
                          ssrRenderList(logs.value, (l) => {
                            _push4(ssrRenderComponent(unref(_sfc_main$5), {
                              key: l.id
                            }, {
                              default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                                if (_push5) {
                                  _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      if (_push6) {
                                        _push6(`${ssrInterpolate(new Date(l.created_at).toLocaleString())}`);
                                      } else {
                                        return [
                                          createTextVNode(toDisplayString(new Date(l.created_at).toLocaleString()), 1)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                  _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      var _a, _b;
                                      if (_push6) {
                                        _push6(`${ssrInterpolate(((_a = l.consumable) == null ? void 0 : _a.name) ?? "Удалён")}`);
                                      } else {
                                        return [
                                          createTextVNode(toDisplayString(((_b = l.consumable) == null ? void 0 : _b.name) ?? "Удалён"), 1)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                  _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      if (_push6) {
                                        _push6(`<span class="${ssrRenderClass({
                                          "text-blue-600": l.type === "issue",
                                          "text-orange-600": l.type === "adjust",
                                          "text-green-600": l.type === "return",
                                          "text-red-600": l.type === "delete",
                                          "text-gray-600": l.type === "create"
                                        })}"${_scopeId5}>${ssrInterpolate(typeLabels[l.type] ?? l.type)}</span>`);
                                      } else {
                                        return [
                                          createVNode("span", {
                                            class: {
                                              "text-blue-600": l.type === "issue",
                                              "text-orange-600": l.type === "adjust",
                                              "text-green-600": l.type === "return",
                                              "text-red-600": l.type === "delete",
                                              "text-gray-600": l.type === "create"
                                            }
                                          }, toDisplayString(typeLabels[l.type] ?? l.type), 3)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                  _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      if (_push6) {
                                        _push6(`${ssrInterpolate(l.quantity)}`);
                                      } else {
                                        return [
                                          createTextVNode(toDisplayString(l.quantity), 1)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                  _push5(ssrRenderComponent(unref(_sfc_main$6), null, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      var _a, _b;
                                      if (_push6) {
                                        _push6(`${ssrInterpolate(((_a = l.installer) == null ? void 0 : _a.name) ?? "-")}`);
                                      } else {
                                        return [
                                          createTextVNode(toDisplayString(((_b = l.installer) == null ? void 0 : _b.name) ?? "-"), 1)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                } else {
                                  return [
                                    createVNode(unref(_sfc_main$6), null, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(new Date(l.created_at).toLocaleString()), 1)
                                      ]),
                                      _: 2
                                    }, 1024),
                                    createVNode(unref(_sfc_main$6), null, {
                                      default: withCtx(() => {
                                        var _a;
                                        return [
                                          createTextVNode(toDisplayString(((_a = l.consumable) == null ? void 0 : _a.name) ?? "Удалён"), 1)
                                        ];
                                      }),
                                      _: 2
                                    }, 1024),
                                    createVNode(unref(_sfc_main$6), null, {
                                      default: withCtx(() => [
                                        createVNode("span", {
                                          class: {
                                            "text-blue-600": l.type === "issue",
                                            "text-orange-600": l.type === "adjust",
                                            "text-green-600": l.type === "return",
                                            "text-red-600": l.type === "delete",
                                            "text-gray-600": l.type === "create"
                                          }
                                        }, toDisplayString(typeLabels[l.type] ?? l.type), 3)
                                      ]),
                                      _: 2
                                    }, 1024),
                                    createVNode(unref(_sfc_main$6), null, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(l.quantity), 1)
                                      ]),
                                      _: 2
                                    }, 1024),
                                    createVNode(unref(_sfc_main$6), null, {
                                      default: withCtx(() => {
                                        var _a;
                                        return [
                                          createTextVNode(toDisplayString(((_a = l.installer) == null ? void 0 : _a.name) ?? "-"), 1)
                                        ];
                                      }),
                                      _: 2
                                    }, 1024)
                                  ];
                                }
                              }),
                              _: 2
                            }, _parent4, _scopeId3));
                          });
                          _push4(`<!--]-->`);
                        } else {
                          return [
                            (openBlock(true), createBlock(Fragment, null, renderList(logs.value, (l) => {
                              return openBlock(), createBlock(unref(_sfc_main$5), {
                                key: l.id
                              }, {
                                default: withCtx(() => [
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(new Date(l.created_at).toLocaleString()), 1)
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => {
                                      var _a;
                                      return [
                                        createTextVNode(toDisplayString(((_a = l.consumable) == null ? void 0 : _a.name) ?? "Удалён"), 1)
                                      ];
                                    }),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createVNode("span", {
                                        class: {
                                          "text-blue-600": l.type === "issue",
                                          "text-orange-600": l.type === "adjust",
                                          "text-green-600": l.type === "return",
                                          "text-red-600": l.type === "delete",
                                          "text-gray-600": l.type === "create"
                                        }
                                      }, toDisplayString(typeLabels[l.type] ?? l.type), 3)
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(l.quantity), 1)
                                    ]),
                                    _: 2
                                  }, 1024),
                                  createVNode(unref(_sfc_main$6), null, {
                                    default: withCtx(() => {
                                      var _a;
                                      return [
                                        createTextVNode(toDisplayString(((_a = l.installer) == null ? void 0 : _a.name) ?? "-"), 1)
                                      ];
                                    }),
                                    _: 2
                                  }, 1024)
                                ]),
                                _: 2
                              }, 1024);
                            }), 128))
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$1), null, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$5), null, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Дата")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Расходник")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Операция")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Кол-во")
                                ]),
                                _: 1
                              }),
                              createVNode(unref(_sfc_main$2), null, {
                                default: withCtx(() => [
                                  createTextVNode("Монтажник")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      }),
                      createVNode(unref(_sfc_main$8), null, {
                        default: withCtx(() => [
                          (openBlock(true), createBlock(Fragment, null, renderList(logs.value, (l) => {
                            return openBlock(), createBlock(unref(_sfc_main$5), {
                              key: l.id
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(new Date(l.created_at).toLocaleString()), 1)
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => {
                                    var _a;
                                    return [
                                      createTextVNode(toDisplayString(((_a = l.consumable) == null ? void 0 : _a.name) ?? "Удалён"), 1)
                                    ];
                                  }),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createVNode("span", {
                                      class: {
                                        "text-blue-600": l.type === "issue",
                                        "text-orange-600": l.type === "adjust",
                                        "text-green-600": l.type === "return",
                                        "text-red-600": l.type === "delete",
                                        "text-gray-600": l.type === "create"
                                      }
                                    }, toDisplayString(typeLabels[l.type] ?? l.type), 3)
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(l.quantity), 1)
                                  ]),
                                  _: 2
                                }, 1024),
                                createVNode(unref(_sfc_main$6), null, {
                                  default: withCtx(() => {
                                    var _a;
                                    return [
                                      createTextVNode(toDisplayString(((_a = l.installer) == null ? void 0 : _a.name) ?? "-"), 1)
                                    ];
                                  }),
                                  _: 2
                                }, 1024)
                              ]),
                              _: 2
                            }, 1024);
                          }), 128))
                        ]),
                        _: 2
                      }, 1024)
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
            }
            _push2(`</div>`);
            if (showModal.value) {
              _push2(`<div class="fixed inset-0 bg-black/40 flex items-center justify-center"${_scopeId}><div class="bg-white p-6 rounded-xl shadow-xl w-[400px]"${_scopeId}><h2 class="text-xl font-bold mb-4"${_scopeId}>Выдать расходник</h2><label class="text-sm text-gray-500"${_scopeId}>Монтажник</label>`);
              _push2(ssrRenderComponent(unref(_sfc_main$e), {
                modelValue: selectedInstaller.value,
                "onUpdate:modelValue": ($event) => selectedInstaller.value = $event
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(ssrRenderComponent(unref(_sfc_main$f), { class: "w-full mb-3" }, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$g), { placeholder: "Выберите монтажника" }, null, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$g), { placeholder: "Выберите монтажника" })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                    _push3(ssrRenderComponent(unref(_sfc_main$h), null, {
                      default: withCtx((_3, _push4, _parent4, _scopeId3) => {
                        if (_push4) {
                          _push4(ssrRenderComponent(unref(_sfc_main$i), null, {
                            default: withCtx((_4, _push5, _parent5, _scopeId4) => {
                              if (_push5) {
                                _push5(ssrRenderComponent(unref(_sfc_main$j), null, {
                                  default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                    if (_push6) {
                                      _push6(`Монтажники`);
                                    } else {
                                      return [
                                        createTextVNode("Монтажники")
                                      ];
                                    }
                                  }),
                                  _: 1
                                }, _parent5, _scopeId4));
                                _push5(`<!--[-->`);
                                ssrRenderList(installers.value, (i) => {
                                  _push5(ssrRenderComponent(unref(_sfc_main$k), {
                                    key: i.id,
                                    value: String(i.id)
                                  }, {
                                    default: withCtx((_5, _push6, _parent6, _scopeId5) => {
                                      if (_push6) {
                                        _push6(`${ssrInterpolate(i.name)}`);
                                      } else {
                                        return [
                                          createTextVNode(toDisplayString(i.name), 1)
                                        ];
                                      }
                                    }),
                                    _: 2
                                  }, _parent5, _scopeId4));
                                });
                                _push5(`<!--]-->`);
                              } else {
                                return [
                                  createVNode(unref(_sfc_main$j), null, {
                                    default: withCtx(() => [
                                      createTextVNode("Монтажники")
                                    ]),
                                    _: 1
                                  }),
                                  (openBlock(true), createBlock(Fragment, null, renderList(installers.value, (i) => {
                                    return openBlock(), createBlock(unref(_sfc_main$k), {
                                      key: i.id,
                                      value: String(i.id)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(i.name), 1)
                                      ]),
                                      _: 2
                                    }, 1032, ["value"]);
                                  }), 128))
                                ];
                              }
                            }),
                            _: 1
                          }, _parent4, _scopeId3));
                        } else {
                          return [
                            createVNode(unref(_sfc_main$i), null, {
                              default: withCtx(() => [
                                createVNode(unref(_sfc_main$j), null, {
                                  default: withCtx(() => [
                                    createTextVNode("Монтажники")
                                  ]),
                                  _: 1
                                }),
                                (openBlock(true), createBlock(Fragment, null, renderList(installers.value, (i) => {
                                  return openBlock(), createBlock(unref(_sfc_main$k), {
                                    key: i.id,
                                    value: String(i.id)
                                  }, {
                                    default: withCtx(() => [
                                      createTextVNode(toDisplayString(i.name), 1)
                                    ]),
                                    _: 2
                                  }, 1032, ["value"]);
                                }), 128))
                              ]),
                              _: 1
                            })
                          ];
                        }
                      }),
                      _: 1
                    }, _parent3, _scopeId2));
                  } else {
                    return [
                      createVNode(unref(_sfc_main$f), { class: "w-full mb-3" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$g), { placeholder: "Выберите монтажника" })
                        ]),
                        _: 1
                      }),
                      createVNode(unref(_sfc_main$h), null, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$i), null, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$j), null, {
                                default: withCtx(() => [
                                  createTextVNode("Монтажники")
                                ]),
                                _: 1
                              }),
                              (openBlock(true), createBlock(Fragment, null, renderList(installers.value, (i) => {
                                return openBlock(), createBlock(unref(_sfc_main$k), {
                                  key: i.id,
                                  value: String(i.id)
                                }, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(i.name), 1)
                                  ]),
                                  _: 2
                                }, 1032, ["value"]);
                              }), 128))
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(`<label class="text-sm text-gray-500"${_scopeId}>Количество</label>`);
              _push2(ssrRenderComponent(unref(_sfc_main$c), {
                type: "number",
                modelValue: quantity.value,
                "onUpdate:modelValue": ($event) => quantity.value = $event,
                min: "1",
                class: "mb-4"
              }, null, _parent2, _scopeId));
              _push2(`<div class="flex justify-end gap-2"${_scopeId}>`);
              _push2(ssrRenderComponent(unref(_sfc_main$d), {
                variant: "outline",
                onClick: ($event) => showModal.value = false
              }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(`Отмена`);
                  } else {
                    return [
                      createTextVNode("Отмена")
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(ssrRenderComponent(unref(_sfc_main$d), { onClick: refill }, {
                default: withCtx((_2, _push3, _parent3, _scopeId2) => {
                  if (_push3) {
                    _push3(`Выдать`);
                  } else {
                    return [
                      createTextVNode("Выдать")
                    ];
                  }
                }),
                _: 1
              }, _parent2, _scopeId));
              _push2(`</div></div></div>`);
            } else {
              _push2(`<!---->`);
            }
          } else {
            return [
              createVNode("div", { class: "p-6" }, [
                createVNode("h1", { class: "text-2xl font-bold mb-4" }, "Склад"),
                createVNode(unref(_sfc_main$9), { class: "mb-10" }, {
                  default: withCtx(() => [
                    createVNode(unref(_sfc_main$1), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$5), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Монтажник")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Расходник")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Центральный склад")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Личный склад")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$8), null, {
                      default: withCtx(() => [
                        (openBlock(true), createBlock(Fragment, null, renderList(installerStocks.value, (installer) => {
                          return openBlock(), createBlock(unref(_sfc_main$5), {
                            key: installer.installer_id
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(installer.installer_name), 1)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                    return openBlock(), createBlock("div", {
                                      key: s.id
                                    }, toDisplayString(s.name), 1);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                    return openBlock(), createBlock("div", {
                                      key: s.id
                                    }, toDisplayString(s.central_stock), 1);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  (openBlock(true), createBlock(Fragment, null, renderList(installer.stocks, (s) => {
                                    return openBlock(), createBlock("div", {
                                      key: s.id
                                    }, toDisplayString(s.personal_stock), 1);
                                  }), 128))
                                ]),
                                _: 2
                              }, 1024)
                            ]),
                            _: 2
                          }, 1024);
                        }), 128))
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }),
                createVNode("div", { class: "mb-4 flex gap-2" }, [
                  createVNode(unref(_sfc_main$c), {
                    modelValue: newConsumable.value.name,
                    "onUpdate:modelValue": ($event) => newConsumable.value.name = $event,
                    placeholder: "Название"
                  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                  createVNode(unref(_sfc_main$c), {
                    modelValue: newConsumable.value.unit,
                    "onUpdate:modelValue": ($event) => newConsumable.value.unit = $event,
                    placeholder: "Ед. изм."
                  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                  createVNode(unref(_sfc_main$c), {
                    modelValue: newConsumable.value.stock,
                    "onUpdate:modelValue": ($event) => newConsumable.value.stock = $event,
                    modelModifiers: { number: true },
                    type: "number",
                    placeholder: "Остаток",
                    class: "w-24"
                  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                  createVNode(unref(_sfc_main$d), { onClick: addConsumable }, {
                    default: withCtx(() => [
                      createTextVNode("Добавить")
                    ]),
                    _: 1
                  })
                ]),
                createVNode(unref(_sfc_main$9), null, {
                  default: withCtx(() => [
                    createVNode(unref(_sfc_main$1), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$5), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("ID")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Название")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Ед.")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Остаток")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Действия")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$8), null, {
                      default: withCtx(() => [
                        (openBlock(true), createBlock(Fragment, null, renderList(consumables.value, (c) => {
                          return openBlock(), createBlock(unref(_sfc_main$5), {
                            key: c.id
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(c.id), 1)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode(unref(_sfc_main$c), {
                                    modelValue: c.name,
                                    "onUpdate:modelValue": ($event) => c.name = $event
                                  }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode(unref(_sfc_main$c), {
                                    modelValue: c.unit,
                                    "onUpdate:modelValue": ($event) => c.unit = $event
                                  }, null, 8, ["modelValue", "onUpdate:modelValue"])
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode("div", { class: "flex items-center gap-2" }, [
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "destructive",
                                      size: "sm",
                                      onClick: ($event) => adjust(c, -1)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode("-")
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"]),
                                    createVNode(unref(_sfc_main$c), {
                                      modelValue: c.stock,
                                      "onUpdate:modelValue": ($event) => c.stock = $event,
                                      modelModifiers: { number: true },
                                      type: "number",
                                      class: "w-20 text-center"
                                    }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "success",
                                      size: "sm",
                                      onClick: ($event) => adjust(c, 1)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode("+")
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"])
                                  ])
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode("div", { class: "flex gap-2" }, [
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "outline",
                                      size: "sm",
                                      onClick: ($event) => updateConsumable(c)
                                    }, {
                                      default: withCtx(() => [
                                        (openBlock(), createBlock("svg", {
                                          xmlns: "http://www.w3.org/2000/svg",
                                          width: "24",
                                          height: "24",
                                          viewBox: "0 0 24 24",
                                          fill: "none",
                                          stroke: "currentColor",
                                          "stroke-width": "2",
                                          "stroke-linecap": "round",
                                          "stroke-linejoin": "round",
                                          class: "lucide lucide-save-icon lucide-save"
                                        }, [
                                          createVNode("path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }),
                                          createVNode("path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }),
                                          createVNode("path", { d: "M7 3v4a1 1 0 0 0 1 1h7" })
                                        ]))
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"]),
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "secondary",
                                      size: "sm",
                                      onClick: ($event) => openModal(c.id)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode(" ➜ Выдать монтажнику ")
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"]),
                                    createVNode(unref(_sfc_main$d), {
                                      variant: "destructive",
                                      size: "sm",
                                      onClick: ($event) => deleteConsumable(c)
                                    }, {
                                      default: withCtx(() => [
                                        (openBlock(), createBlock("svg", {
                                          xmlns: "http://www.w3.org/2000/svg",
                                          width: "24",
                                          height: "24",
                                          viewBox: "0 0 24 24",
                                          fill: "none",
                                          stroke: "currentColor",
                                          "stroke-width": "2",
                                          "stroke-linecap": "round",
                                          "stroke-linejoin": "round",
                                          class: "lucide lucide-trash-icon lucide-trash"
                                        }, [
                                          createVNode("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
                                          createVNode("path", { d: "M3 6h18" }),
                                          createVNode("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
                                        ]))
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick"])
                                  ])
                                ]),
                                _: 2
                              }, 1024)
                            ]),
                            _: 2
                          }, 1024);
                        }), 128))
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }),
                createVNode("h2", { class: "text-xl font-bold mt-10 mb-4" }, "История движений"),
                logs.value.length === 0 ? (openBlock(), createBlock("div", {
                  key: 0,
                  class: "text-gray-500"
                }, "Истории пока нет")) : (openBlock(), createBlock(unref(_sfc_main$9), { key: 1 }, {
                  default: withCtx(() => [
                    createVNode(unref(_sfc_main$1), null, {
                      default: withCtx(() => [
                        createVNode(unref(_sfc_main$5), null, {
                          default: withCtx(() => [
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Дата")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Расходник")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Операция")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Кол-во")
                              ]),
                              _: 1
                            }),
                            createVNode(unref(_sfc_main$2), null, {
                              default: withCtx(() => [
                                createTextVNode("Монтажник")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    createVNode(unref(_sfc_main$8), null, {
                      default: withCtx(() => [
                        (openBlock(true), createBlock(Fragment, null, renderList(logs.value, (l) => {
                          return openBlock(), createBlock(unref(_sfc_main$5), {
                            key: l.id
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(new Date(l.created_at).toLocaleString()), 1)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => {
                                  var _a;
                                  return [
                                    createTextVNode(toDisplayString(((_a = l.consumable) == null ? void 0 : _a.name) ?? "Удалён"), 1)
                                  ];
                                }),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createVNode("span", {
                                    class: {
                                      "text-blue-600": l.type === "issue",
                                      "text-orange-600": l.type === "adjust",
                                      "text-green-600": l.type === "return",
                                      "text-red-600": l.type === "delete",
                                      "text-gray-600": l.type === "create"
                                    }
                                  }, toDisplayString(typeLabels[l.type] ?? l.type), 3)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => [
                                  createTextVNode(toDisplayString(l.quantity), 1)
                                ]),
                                _: 2
                              }, 1024),
                              createVNode(unref(_sfc_main$6), null, {
                                default: withCtx(() => {
                                  var _a;
                                  return [
                                    createTextVNode(toDisplayString(((_a = l.installer) == null ? void 0 : _a.name) ?? "-"), 1)
                                  ];
                                }),
                                _: 2
                              }, 1024)
                            ]),
                            _: 2
                          }, 1024);
                        }), 128))
                      ]),
                      _: 2
                    }, 1024)
                  ]),
                  _: 2
                }, 1024))
              ]),
              showModal.value ? (openBlock(), createBlock("div", {
                key: 0,
                class: "fixed inset-0 bg-black/40 flex items-center justify-center"
              }, [
                createVNode("div", { class: "bg-white p-6 rounded-xl shadow-xl w-[400px]" }, [
                  createVNode("h2", { class: "text-xl font-bold mb-4" }, "Выдать расходник"),
                  createVNode("label", { class: "text-sm text-gray-500" }, "Монтажник"),
                  createVNode(unref(_sfc_main$e), {
                    modelValue: selectedInstaller.value,
                    "onUpdate:modelValue": ($event) => selectedInstaller.value = $event
                  }, {
                    default: withCtx(() => [
                      createVNode(unref(_sfc_main$f), { class: "w-full mb-3" }, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$g), { placeholder: "Выберите монтажника" })
                        ]),
                        _: 1
                      }),
                      createVNode(unref(_sfc_main$h), null, {
                        default: withCtx(() => [
                          createVNode(unref(_sfc_main$i), null, {
                            default: withCtx(() => [
                              createVNode(unref(_sfc_main$j), null, {
                                default: withCtx(() => [
                                  createTextVNode("Монтажники")
                                ]),
                                _: 1
                              }),
                              (openBlock(true), createBlock(Fragment, null, renderList(installers.value, (i) => {
                                return openBlock(), createBlock(unref(_sfc_main$k), {
                                  key: i.id,
                                  value: String(i.id)
                                }, {
                                  default: withCtx(() => [
                                    createTextVNode(toDisplayString(i.name), 1)
                                  ]),
                                  _: 2
                                }, 1032, ["value"]);
                              }), 128))
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  }, 8, ["modelValue", "onUpdate:modelValue"]),
                  createVNode("label", { class: "text-sm text-gray-500" }, "Количество"),
                  createVNode(unref(_sfc_main$c), {
                    type: "number",
                    modelValue: quantity.value,
                    "onUpdate:modelValue": ($event) => quantity.value = $event,
                    min: "1",
                    class: "mb-4"
                  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
                  createVNode("div", { class: "flex justify-end gap-2" }, [
                    createVNode(unref(_sfc_main$d), {
                      variant: "outline",
                      onClick: ($event) => showModal.value = false
                    }, {
                      default: withCtx(() => [
                        createTextVNode("Отмена")
                      ]),
                      _: 1
                    }, 8, ["onClick"]),
                    createVNode(unref(_sfc_main$d), { onClick: refill }, {
                      default: withCtx(() => [
                        createTextVNode("Выдать")
                      ]),
                      _: 1
                    })
                  ])
                ])
              ])) : createCommentVNode("", true)
            ];
          }
        }),
        _: 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/consumables/Consumables.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export {
  _sfc_main as default
};
