import { S as m, d6 as d, a4 as r } from "./56c67d3b.js";
import "react";
import "react-dom";
const f = {
  viewRef: m,
  containerRef: m
};
function u() {
  return [...d([{
    name: "seekTo",
    description: r("media.seekTo"),
    params: [{
      name: "amount",
      type: "number",
      description: r("media.seekToAmount")
    }]
  }, {
    name: "showPreview",
    description: r("media.showPreview"),
    params: []
  }]), {
    method: {
      name: "play",
      description: r("media.playDesc"),
      params: []
    },
    execute: (i) => {
      var a, t, o, s;
      const e = (a = i.children.viewRef.viewRef) == null ? void 0 : a.getInternalPlayer();
      if (e && e.play)
        return e.play();
      {
        const n = (o = (t = i.children.containerRef.viewRef) == null ? void 0 : t.getElementsByClassName("react-player__preview")) == null ? void 0 : o.item(0);
        n && ((s = n.click) == null || s.call(n));
      }
    }
  }, {
    method: {
      name: "pause",
      description: r("media.pauseDesc"),
      params: []
    },
    execute: (i) => {
      var a;
      const e = (a = i.children.viewRef.viewRef) == null ? void 0 : a.getInternalPlayer();
      e && e.pause && e.pause();
    }
  }, {
    method: {
      name: "load",
      description: r("media.loadDesc"),
      params: []
    },
    execute: (i) => {
      var a;
      const e = (a = i.children.viewRef.viewRef) == null ? void 0 : a.getInternalPlayer();
      e && e.load && e.load();
    }
  }];
}
export {
  f as mediaCommonChildren,
  u as mediaMethods
};
