import { ref as g, computed as S, defineComponent as y, mergeModels as A, useModel as B, onMounted as me, createBlock as f, openBlock as c, unref as e, withCtx as C, createElementVNode as u, toDisplayString as v, createTextVNode as H, createVNode as d, createElementBlock as x, Fragment as Q, createCommentVNode as F, mergeProps as fe, isRef as j, renderList as ge, Teleport as ve, onBeforeMount as he } from "vue";
import { useI18n as D } from "vue-i18n";
import { defineStore as ke, storeToRefs as be } from "pinia";
import { M as ye, s as m, Z as q, X, o as W, Y as Z, I as h, ao as _e, L as J, aX as $e, aY as we, aw as Ve, aB as Ce, d as Te, f as Ie, aC as Se, aZ as Ae } from "./start-CE9SawgU.js";
import { b as I } from "./header-Bn1EKnBE.js";
const xe = ye, ee = `${xe}Support.`, w = `${ee}Issues.`, M = {
  /** returns a list of issues */
  async getList(n) {
    return m.post(`${w}getList`, n);
  },
  /** returns an issue */
  async get(n) {
    return m.post(`${w}get`, { id: n });
  },
  /** create issue */
  async create(n, t) {
    return m.post(`${w}create`, {
      summary: n,
      description: t
    });
  },
  /** comment issue */
  async comment(n, t) {
    return m.post(`${w}comment`, {
      issueId: n,
      comment: t
    });
  },
  /** Returns a list of worklogs */
  async listWorklog(n) {
    return m.post(`${w}listWorklog`, n);
  },
  /** getAttachment */
  async getAttachment(n, t) {
    return m.post(`${w}getAttachment`, {
      issueId: n,
      attachmentId: t
    });
  },
  /** attaches a file to an existing issue */
  async attachFile(n, t, o, a) {
    return m.post(`${w}attachFile`, {
      issue: n,
      filename: t,
      mimeType: o,
      attachment: a
    });
  },
  /** getDescriptionGoodTicket */
  async getDescriptionGoodTicket() {
    return m.post(`${w}getDescriptionGoodTicket`);
  }
}, V = `${ee}Packages.`, Y = {
  /** getList */
  async getList() {
    return m.post(`${V}getList`);
  },
  /** getBalance */
  async getBalance() {
    return m.post(`${V}getBalance`);
  },
  /** getCurrentPhoneNumber */
  async getCurrentPhoneNumber() {
    return m.post(`${V}getCurrentPhoneNumber`);
  },
  /** hasConsulting */
  async hasConsulting() {
    return m.post(`${V}hasConsulting`);
  },
  /** unlockPersonalAssistant */
  async unlockPersonalAssistant() {
    return m.post(`${V}unlockPersonalAssistant`);
  },
  /** getPersonalContact */
  async getPersonalContact() {
    return m.post(`${V}getPersonalContact`);
  },
  /** returns the url where personal assistants can be unlocked */
  async getUnlockAssistantUrl() {
    return m.post(`${V}getUnlockAssistantUrl`);
  },
  /** returns the url where support packages can be compared */
  async getComparePackagesUrl() {
    return m.post(`${V}getComparePackagesUrl`);
  }
}, De = ke("Support-store", () => {
  const n = g(), { isLoading: t, api: o } = q({
    apiFn: async () => {
      const r = await Y.getBalance();
      return n.value = r, { data: [r] };
    }
  }), a = g(), { isLoading: s, api: i } = q({
    apiFn: async () => {
      const { list: r } = await Y.getList();
      return a.value = r.find(({ active: k }) => k), { data: r };
    }
  }), l = S(() => n.value?.isConsulting), p = S(() => n.value?.hasWorklogs);
  return {
    balance: n,
    isBalancesLoading: t,
    ensureBalances: o,
    isConsulting: l,
    hasWorklogs: p,
    activePackage: a,
    isPackagesLoading: s,
    ensurePackages: i
  };
}), Ue = /* @__PURE__ */ y({
  __name: "GoodTicketDescription",
  props: /* @__PURE__ */ A({
    goodTicket: {}
  }, {
    modelValue: { type: Boolean },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(n) {
    const t = n, o = B(n, "modelValue"), a = g();
    return me(() => {
      const s = a.value?.contentWindow?.document;
      s && (s.body.innerHTML = t.goodTicket);
    }), (s, i) => (c(), f(e(X), {
      modelValue: o.value,
      "onUpdate:modelValue": i[0] || (i[0] = (l) => o.value = l),
      "max-width": "620",
      height: "70vh"
    }, {
      default: C(() => [
        u("iframe", {
          ref_key: "iframeRef",
          ref: a,
          width: "100%",
          height: "100%",
          class: "good-ticket-description"
        }, null, 512)
      ]),
      _: 1
    }, 8, ["modelValue"]));
  }
}), Be = /* @__PURE__ */ W(Ue, [["__scopeId", "data-v-8f563915"]]), Fe = { class: "mb-4" }, Le = { class: "mb-4" }, Ee = { class: "mb-4" }, te = /* @__PURE__ */ y({
  __name: "EndOfSupportModal",
  props: {
    modelValue: { type: Boolean },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(n) {
    const t = B(n, "modelValue"), { t: o } = D();
    return (a, s) => (c(), f(e(X), {
      modelValue: t.value,
      "onUpdate:modelValue": s[0] || (s[0] = (i) => t.value = i),
      persistent: "",
      "max-width": "600px"
    }, {
      title: C(() => [
        d(e(Z), {
          text: e(o)("support-plugin.end-of-support.title"),
          type: "warning",
          icon: "lucide:triangle-alert",
          rounded: "0"
        }, null, 8, ["text"])
      ]),
      default: C(() => [
        u("p", Fe, v(e(o)("support-plugin.end-of-support.message1")), 1),
        u("p", null, v(e(o)("support-plugin.end-of-support.message2")), 1),
        u("p", Le, v(e(o)("support-plugin.end-of-support.message3")), 1),
        u("p", null, v(e(o)("support-plugin.end-of-support.message4")), 1),
        u("p", null, [
          H(v(e(o)("support-plugin.end-of-support.message5-1")) + " ", 1),
          s[1] || (s[1] = u("a", { href: "mailto:csm@actindo.com" }, " csm@actindo.com ", -1)),
          H(" " + v(e(o)("support-plugin.end-of-support.message5-2")), 1)
        ]),
        u("p", Ee, v(e(o)("support-plugin.end-of-support.message6")), 1),
        u("p", null, v(e(o)("support-plugin.end-of-support.message7")), 1),
        u("p", null, v(e(o)("support-plugin.end-of-support.message8")), 1)
      ]),
      _: 1
    }, 8, ["modelValue"]));
  }
});
function K(n) {
  const t = n;
  t.__i18n = t.__i18n || [], t.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "support-plugin": {
          "end-of-support": {
            title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "End of Support" } },
            message1: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Dear customer," } },
            message2: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "since 01/12/2022 the support in its previous form is no longer available." } },
            message3: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "This is due to the fact that we can technically no longer support older systems with the necessary complexity." } },
            message4: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "We regret having to make this decision, but we would like to offer you the opportunity to find an individual solution for you." } },
            "message5-1": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Please contact us at " } },
            "message5-2": { t: 0, b: { t: 2, i: [{ t: 3 }], s: " if you are interested." } },
            message6: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Our Customer Success Management will get in touch with you as soon as possible." } },
            message7: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "With kind regards" } },
            message8: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Your Actindo Team" } }
          }
        }
      },
      "de-DE": {
        "support-plugin": {
          "end-of-support": {
            title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ende des Supports" } },
            message1: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Sehr geehrter Kunde, sehr geehrte Kundin," } },
            message2: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "seit dem 01.12.2022 steht der Support in seiner bisherigen Form nicht mehr zur Verfügung." } },
            message3: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Dies liegt darin begründet, dass wir ältere Systeme im dafür notwendigen Rahmen technisch nicht weiter unterstützen können." } },
            message4: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Wir bedauern, diese Entscheidung treffen zu müssen, jedoch möchten wir Ihnen gern die Möglichkeit bieten, eine individuelle Lösung für Sie zu finden." } },
            "message5-1": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bitte wenden Sie sich bei Interesse an " } },
            "message5-2": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "." } },
            message6: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Unser Customer Success Management wird sich anschließend mit Ihnen in Verbindung setzen." } },
            message7: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Mit freundlichen Grüßen" } },
            message8: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ihr Actindo-Team" } }
          }
        }
      }
    }
  });
}
typeof K == "function" && K(te);
const ne = /* @__PURE__ */ y({
  __name: "TopIcon",
  props: {
    icon: { default: "lucide:circle-question-mark" },
    tooltip: {}
  },
  setup(n) {
    return (t, o) => (c(), f(e(h), {
      icon: t.icon,
      color: "icons",
      variant: "text",
      density: "comfortable"
    }, {
      default: C(() => [
        d(e(_e)),
        d(e(J), {
          text: t.tooltip,
          activator: "parent",
          location: "bottom"
        }, null, 8, ["text"])
      ]),
      _: 1
    }, 8, ["icon"]));
  }
}), oe = /* @__PURE__ */ y({
  __name: "WithoutConsulting",
  props: {
    icon: {}
  },
  setup(n) {
    const { t } = D(), o = g(!1);
    function a() {
      o.value = !0;
    }
    return (s, i) => (c(), x(Q, null, [
      d(ne, {
        icon: s.icon,
        tooltip: e(t)("support-plugin.create-icon.endOfSupport"),
        onClick: a
      }, null, 8, ["icon", "tooltip"]),
      o.value ? (c(), f(te, {
        key: 0,
        modelValue: o.value,
        "onUpdate:modelValue": i[0] || (i[0] = (l) => o.value = l)
      }, null, 8, ["modelValue"])) : F("", !0)
    ], 64));
  }
});
function b(n) {
  const t = n;
  t.__i18n = t.__i18n || [], t.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "support-plugin": {
          "create-icon": {
            success: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Request submitted successfully" } },
            ticketCreated: { t: 0, b: { t: 2, i: [{ t: 3, v: "Your ticket " }, { t: 5, i: 0 }, { t: 3, v: " has been created and will be processed by us shortly." }] } },
            furtherQuestions: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Any further questions?" } },
            openTicket: { t: 0, b: { t: 2, i: [{ t: 3, v: "Open ticket " }, { t: 5, i: 0 }] } },
            endOfSupport: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "End of Support" } },
            createTicket: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Create ticket" } },
            contactUs: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Contact us" } },
            summary: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Reason" } },
            description: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Description" } },
            dropFiles: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Drop files here" } }
          }
        }
      },
      "de-DE": {
        "support-plugin": {
          "create-icon": {
            success: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Anfrage erfolgreich übermittelt" } },
            ticketCreated: { t: 0, b: { t: 2, i: [{ t: 3, v: "Ihr Ticket " }, { t: 5, i: 0 }, { t: 3, v: " wurde erstellt und wird in Kürze von uns bearbeitet." }] } },
            furtherQuestions: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Weitere Fragen?" } },
            openTicket: { t: 0, b: { t: 2, i: [{ t: 3, v: "Ticket öffnen " }, { t: 5, i: 0 }] } },
            endOfSupport: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ende des Supports" } },
            createTicket: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ticket erstellen" } },
            contactUs: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Kontaktieren Sie uns" } },
            summary: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Grund" } },
            description: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Beschreibung" } },
            dropFiles: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Dateien hier ablegen" } }
          }
        }
      }
    }
  });
}
typeof b == "function" && b(oe);
const Pe = [
  "application/pdf",
  "image/jpeg",
  "image/png",
  "text/plain",
  "text/csv"
], Me = (n) => Pe.includes(n.type), We = (n) => new Promise((t, o) => {
  const a = new FileReader();
  a.onload = (s) => t(s.target?.result || ""), a.onerror = () => o(new Error("Failed to read file")), a.readAsDataURL(n);
}), Ne = { class: "flex-grow-1 overflow-hidden" }, Re = { class: "font-weight-bold text-truncate" }, Ge = { class: "text-uppercase mr-2" }, Oe = { class: "text-caption" }, ze = /* @__PURE__ */ y({
  __name: "AttachmentItem",
  props: {
    issueId: {},
    attachment: {},
    deletable: { type: Boolean },
    invalid: { type: Boolean }
  },
  emits: ["delete"],
  setup(n) {
    const t = n, o = S(() => t.attachment.mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ? "DOCX" : t.attachment.mimeType.split("/").pop()), a = S(() => $e(t.attachment.created));
    function s(i) {
      return `/Actindo.Modules.Actindo.Support.Attachment.download?issueId=${t.issueId}&attachmentId=${i}`;
    }
    return (i, l) => (c(), f(e(J), {
      text: i.invalid ? i.$t("support-ui.details.invalidAttachment") : i.attachment.fileName
    }, {
      activator: C(({ props: p }) => [
        d(e(we), fe({
          class: "d-flex align-center my-2 ga-2 pa-2",
          rounded: "lg",
          color: i.invalid ? "error" : "transparent"
        }, p), {
          default: C(() => [
            u("div", Ne, [
              u("div", Re, v(i.attachment.fileName), 1),
              u("div", null, [
                u("b", Ge, v(o.value), 1),
                u("span", Oe, v(a.value), 1)
              ])
            ]),
            i.deletable ? (c(), f(e(h), {
              key: 1,
              icon: "lucide:x",
              color: "secondary",
              variant: "text",
              destructive: "",
              onClick: l[0] || (l[0] = (r) => i.$emit("delete"))
            })) : (c(), f(e(h), {
              key: 0,
              icon: "lucide:cloud-download",
              variant: "text",
              href: e(Ve)(s(i.attachment.id)),
              download: ""
            }, null, 8, ["href"]))
          ]),
          _: 1
        }, 16, ["color"])
      ]),
      _: 1
    }, 8, ["text"]));
  }
}), He = /* @__PURE__ */ y({
  __name: "AttachmentFileItem",
  props: {
    file: {}
  },
  emits: ["delete"],
  setup(n) {
    const t = n, o = S(() => ({
      id: 0,
      fileName: t.file.name,
      mimeType: t.file.type,
      size: t.file.size,
      created: (/* @__PURE__ */ new Date()).getTime()
    }));
    return (a, s) => (c(), f(ze, {
      deletable: "",
      attachment: o.value,
      invalid: !e(Me)(a.file),
      onDelete: s[0] || (s[0] = (i) => a.$emit("delete"))
    }, null, 8, ["attachment", "invalid"]));
  }
}), L = g(""), E = g(""), T = g([]), P = g(!1), U = g(), je = () => {
  function n() {
    L.value = "", E.value = "", T.value = [];
  }
  function t(i) {
    i?.length && T.value.push(...Array.from(i));
  }
  function o(i) {
    T.value.splice(i, 1);
  }
  async function a(i) {
    T.value?.length && (await Promise.allSettled(
      T.value.map(async (l) => {
        const p = await We(l);
        await M.attachFile(i, l.name, l.type, p);
      })
    ), T.value = []);
  }
  async function s() {
    U.value = void 0;
    try {
      P.value = !0, U.value = await M.create(
        L.value,
        E.value
      ), await a(U.value.id);
    } catch {
    } finally {
      P.value = !1;
    }
  }
  return {
    summary: L,
    description: E,
    attachments: T,
    isSubmitting: P,
    createdTicket: U,
    clearIssueForm: n,
    handleAddFiles: t,
    handleDeleteFile: o,
    submitTicket: s
  };
}, qe = { class: "d-flex flex-column h-100 overflow-hidden" }, Ye = { class: "d-flex align-center justify-space-between my-2" }, Ke = { class: "ml-4 mr-auto form-title" }, Qe = { class: "form-container" }, Xe = { class: "flex-grow-1 overflow-y-auto" }, Ze = { class: "d-flex justify-space-between" }, se = /* @__PURE__ */ y({
  __name: "CreateTicketForm",
  props: /* @__PURE__ */ A({
    showHelp: { type: Boolean }
  }, {
    modelValue: { type: Boolean, required: !0 },
    modelModifiers: {}
  }),
  emits: /* @__PURE__ */ A(["help", "created"], ["update:modelValue"]),
  setup(n, { emit: t }) {
    const o = t, a = B(n, "modelValue"), { t: s } = D(), {
      summary: i,
      description: l,
      attachments: p,
      isSubmitting: r,
      createdTicket: k,
      clearIssueForm: N,
      handleAddFiles: R,
      handleDeleteFile: re,
      submitTicket: ue
    } = je(), G = g();
    function ce() {
      G.value?.openDialog();
    }
    async function pe() {
      await ue(), k.value && (o("created", k.value), N());
    }
    function O() {
      N(), a.value = !1;
    }
    return (z, _) => (c(), x("div", qe, [
      u("div", Ye, [
        u("span", Ke, v(e(s)("support-plugin.create-icon.contactUs")), 1),
        z.showHelp ? (c(), f(e(h), {
          key: 0,
          icon: "lucide:info",
          color: "primary",
          variant: "text",
          onClick: _[0] || (_[0] = ($) => z.$emit("help"))
        })) : F("", !0),
        d(e(h), {
          icon: "lucide:minus",
          onClick: _[1] || (_[1] = ($) => a.value = !1)
        }),
        d(e(h), {
          icon: "lucide:x",
          onClick: O
        })
      ]),
      d(e(Ce), {
        message: e(s)("support-plugin.create-icon.dropFiles"),
        class: "drop-file-list",
        onUpload: e(R)
      }, {
        default: C(() => [
          u("div", Qe, [
            d(e(Te), {
              modelValue: e(i),
              "onUpdate:modelValue": _[2] || (_[2] = ($) => j(i) ? i.value = $ : null),
              label: e(s)("support-plugin.create-icon.summary")
            }, null, 8, ["modelValue", "label"]),
            d(e(Ie), {
              modelValue: e(l),
              "onUpdate:modelValue": _[3] || (_[3] = ($) => j(l) ? l.value = $ : null),
              placeholder: e(s)("support-plugin.create-icon.description"),
              "append-inner-icon": "lucide:paperclip",
              rows: "6",
              class: "textarea-description",
              "onClick:appendInner": ce
            }, null, 8, ["modelValue", "placeholder"]),
            d(e(Se), {
              ref_key: "inputRef",
              ref: G,
              accept: "application/pdf, image/jpeg, image/png, text/plain, text/csv",
              multiple: "",
              onSelect: e(R)
            }, null, 8, ["onSelect"]),
            u("div", Xe, [
              (c(!0), x(Q, null, ge(e(p), ($, de) => (c(), f(He, {
                key: $.name,
                file: $,
                onDelete: (st) => e(re)(de)
              }, null, 8, ["file", "onDelete"]))), 128))
            ]),
            u("div", Ze, [
              d(e(h), {
                text: e(s)("common.cancel"),
                onClick: O
              }, null, 8, ["text"]),
              d(e(h), {
                text: e(s)("support-plugin.create-icon.createTicket"),
                loading: e(r),
                color: "primary",
                onClick: pe
              }, null, 8, ["text", "loading"])
            ])
          ])
        ]),
        _: 1
      }, 8, ["message", "onUpload"])
    ]));
  }
});
typeof b == "function" && b(se);
const Je = /* @__PURE__ */ W(se, [["__scopeId", "data-v-29e60f90"]]);
var ie = ((n) => (n.MAIN_REDIRECT = `${I}.MainRedirect`, n.MAIN_PLUGIN_VIEW = `${I}.MainPluginView`, n.TOP_REDIRECT = `${I}.TopRedirect`, n.SUPPORT_LIST_VIEW = `${I}.SupportListView`, n.CONSULTING_LIST_VIEW = `${I}.ConsultingListView`, n))(ie || {});
const et = { class: "d-flex flex-column ga-4 ma-4" }, ae = /* @__PURE__ */ y({
  __name: "SuccessForm",
  props: {
    ticketId: {}
  },
  emits: ["close", "reset"],
  setup(n) {
    const { t } = D();
    return (o, a) => (c(), x("div", et, [
      d(e(Z), {
        variant: "text",
        type: "success",
        text: e(t)("support-plugin.create-icon.success")
      }, null, 8, ["text"]),
      u("div", null, v(e(t)("support-plugin.create-icon.ticketCreated", [o.ticketId])), 1),
      d(e(h), {
        block: "",
        text: e(t)("support-plugin.create-icon.openTicket", [o.ticketId]),
        color: "primary",
        variant: "elevated",
        to: {
          name: e(ie).SUPPORT_LIST_VIEW,
          params: { issueId: o.ticketId }
        },
        onClick: a[0] || (a[0] = (s) => o.$emit("close"))
      }, null, 8, ["text", "to"]),
      d(e(h), {
        text: e(t)("support-plugin.create-icon.furtherQuestions"),
        variant: "outlined",
        onClick: a[1] || (a[1] = (s) => o.$emit("reset"))
      }, null, 8, ["text"]),
      d(e(h), {
        text: e(t)("common.close"),
        onClick: a[2] || (a[2] = (s) => o.$emit("close"))
      }, null, 8, ["text"])
    ]));
  }
});
typeof b == "function" && b(ae);
const le = /* @__PURE__ */ y({
  __name: "CreateTicketSidebar",
  props: /* @__PURE__ */ A({
    showHelp: { type: Boolean }
  }, {
    modelValue: { type: Boolean, required: !0 },
    modelModifiers: {}
  }),
  emits: /* @__PURE__ */ A(["help"], ["update:modelValue"]),
  setup(n) {
    const t = B(n, "modelValue"), o = g(0), a = g();
    function s(l) {
      a.value = l, o.value = 1;
    }
    function i() {
      t.value = !1, o.value = 0;
    }
    return (l, p) => t.value ? (c(), f(ve, {
      key: 0,
      to: "body"
    }, [
      d(e(Ae), {
        modelValue: t.value,
        "onUpdate:modelValue": p[3] || (p[3] = (r) => t.value = r),
        location: "right",
        temporary: "",
        sticky: "",
        width: "400",
        scrim: !1
      }, {
        default: C(() => [
          o.value === 0 ? (c(), f(Je, {
            key: 0,
            modelValue: t.value,
            "onUpdate:modelValue": p[0] || (p[0] = (r) => t.value = r),
            "show-help": l.showHelp,
            onHelp: p[1] || (p[1] = (r) => l.$emit("help")),
            onCreated: s
          }, null, 8, ["modelValue", "show-help"])) : (c(), f(ae, {
            key: 1,
            "ticket-id": a.value?.id,
            onClose: i,
            onReset: p[2] || (p[2] = (r) => o.value = 0)
          }, null, 8, ["ticket-id"]))
        ]),
        _: 1
      }, 8, ["modelValue"])
    ])) : F("", !0);
  }
});
typeof b == "function" && b(le);
const tt = /* @__PURE__ */ W(le, [["__scopeId", "data-v-858ebb8e"]]), nt = { class: "mx-2" }, ot = /* @__PURE__ */ y({
  __name: "CreateIssueIcon",
  props: {
    module: {}
  },
  setup(n) {
    const { t } = D(), o = De(), { isConsulting: a } = be(o), s = g(!1), i = g(!0), l = g("");
    return he(async () => {
      o.ensureBalances(), l.value = await M.getDescriptionGoodTicket();
    }), (p, r) => (c(), x("div", nt, [
      e(a) ? (c(), f(ne, {
        key: 0,
        icon: p.module?.icon,
        tooltip: e(t)("support-plugin.create-icon.createTicket"),
        onClick: r[0] || (r[0] = (k) => s.value = !s.value)
      }, null, 8, ["icon", "tooltip"])) : (c(), f(oe, {
        key: 1,
        icon: p.module?.icon
      }, null, 8, ["icon"])),
      d(tt, {
        modelValue: s.value,
        "onUpdate:modelValue": r[1] || (r[1] = (k) => s.value = k),
        "show-help": !!l.value,
        onHelp: r[2] || (r[2] = (k) => i.value = !0)
      }, null, 8, ["modelValue", "show-help"]),
      l.value && s.value && i.value ? (c(), f(Be, {
        key: 2,
        modelValue: i.value,
        "onUpdate:modelValue": r[3] || (r[3] = (k) => i.value = k),
        "good-ticket": l.value
      }, null, 8, ["modelValue", "good-ticket"])) : F("", !0)
    ]));
  }
});
typeof b == "function" && b(ot);
export {
  ot as default
};
