import { _ as Logger } from "./button-Dj4BTre0.js";
import { n as once } from "./once-rJImu7SE.js";
function testStorage(e) {
  try {
    let n = window[e], r = "__storage_test__", i = "test";
    if (!n) return false;
    n.setItem(r, i);
    let a = n.getItem(r);
    return n.removeItem(r), a === i;
  } catch {
    return false;
  }
}
function testDownloadCapability() {
  try {
    return "download" in document.createElement("a");
  } catch {
    return false;
  }
}
function detectIframeCapabilities() {
  let n = window.parent !== window, a = {
    isEmbedded: n,
    hasLocalStorage: testStorage("localStorage"),
    hasSessionStorage: testStorage("sessionStorage"),
    hasClipboard: navigator.clipboard !== void 0,
    hasDownloads: testDownloadCapability(),
    hasFullscreen: document.fullscreenEnabled !== void 0 && document.fullscreenEnabled,
    hasMediaDevices: navigator.mediaDevices !== void 0 && typeof navigator.mediaDevices.getUserMedia == "function"
  };
  return n && (Logger.log("[iframe] Running in embedded context"), a.hasLocalStorage || Logger.warn("[iframe] localStorage unavailable - using fallback storage"), a.hasClipboard || Logger.warn("[iframe] Clipboard API unavailable"), a.hasDownloads || Logger.warn("[iframe] Download capability may be restricted"), a.hasFullscreen || Logger.warn("[iframe] Fullscreen API unavailable"), a.hasMediaDevices || Logger.warn("[iframe] Media devices API unavailable")), a;
}
const getIframeCapabilities = once(() => detectIframeCapabilities());
export {
  getIframeCapabilities as t
};
