import { defineComponent as x, computed as h, resolveComponent as i, createElementBlock as C, openBlock as r, createVNode as a, createElementVNode as p, withCtx as l, createTextVNode as k, toDisplayString as _, createBlock as y, createCommentVNode as E, unref as S } from "vue";
import { E as m } from "./engineCallFileType-yaadA7-2.js";
import { E as T } from "./displayText-Cbh4IOfM.js";
import { _ as B } from "./install-DJFUeaKV.js";
const N = { class: "wt-screen-recordings-action" }, V = { class: "wt-screen-recordings-action__option" }, F = /* @__PURE__ */ x({
  __name: "wt-screen-recordings-action",
  props: {
    files: {}
  },
  emits: ["set-video"],
  setup(d, { emit: u }) {
    const v = d, w = u, t = h(
      () => v?.files?.[m.FileTypeScreensharing]?.map(
        ({ name: e, id: s, mimeType: o, type: n }) => ({
          text: e,
          id: s,
          mimeType: o,
          type: n
        })
      )
    ), f = ({ option: e }) => {
      e.id && e.type === m.FileTypeScreensharing && w("set-video", e);
    };
    return (e, s) => {
      const o = i("wt-icon-btn"), n = i("wt-icon"), g = i("wt-context-menu");
      return r(), C("div", N, [
        a(g, {
          options: t.value,
          "max-width": "400px",
          onClick: f
        }, {
          activator: l(({ toggle: c }) => [
            t.value?.length ? (r(), y(o, {
              key: 0,
              icon: "preview-tag-video",
              onClick: c
            }, null, 8, ["onClick"])) : E("", !0)
          ]),
          option: l(({ text: c }) => [
            p("div", V, [
              a(n, { icon: "preview-tag-video" }),
              k(" " + _(c), 1)
            ])
          ]),
          _: 1
        }, 8, ["options"]),
        p("p", null, _(t.value?.length || S(T)), 1)
      ]);
    };
  }
}), A = /* @__PURE__ */ B(F, [["__scopeId", "data-v-a1fa5099"]]);
export {
  A as default
};
