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