import { a0 as a, b9 as f, w as d, ed as u, cn as h, bv as b, bb as c, U as m, V as r, ee as x, P as p, bh as g, bi as l, bj as n, bg as t, bl as v, bn as y, bo as E, bG as j } from "./684d2f28.js";
import { useContext as o } from "react";
import { defaultData as C } from "./0a417d48.js";
import "react-dom";
const w = [{
  label: a("jsonExplorer.default"),
  value: "shapeshifter:inverted"
}, {
  label: a("jsonExplorer.defaultDark"),
  value: "shapeshifter"
}, {
  label: a("jsonExplorer.neutralLight"),
  value: "grayscale:inverted"
}, {
  label: a("jsonExplorer.neutralDark"),
  value: "grayscale"
}, {
  label: a("jsonExplorer.azure"),
  value: "apathy:inverted"
}, {
  label: a("jsonExplorer.darkBlue"),
  value: "flat"
}], S = {
  "shapeshifter:inverted": "#ffffff",
  shapeshifter: "#000000",
  "grayscale:inverted": "#ffffff",
  grayscale: "#000000",
  "apathy:inverted": "#efffff",
  flat: "#2c3e50"
}, D = f.div`
  height: 100%;
  overflow-y: scroll;
  background-color: ${(s) => S[s.$theme] || "#ffffff"};
  border: 1px solid #d7d9e0;
  border-radius: 4px;
  padding: 10px;
`;
let i = function() {
  const s = {
    value: d(u, JSON.stringify(C, null, 2)),
    indent: d(h, 4),
    expandToggle: b.DEFAULT_TRUE,
    theme: c(w, "shapeshifter:inverted")
  };
  return new m(s, (e) => /* @__PURE__ */ r(D, {
    $theme: e.theme,
    children: /* @__PURE__ */ r(x, {
      name: !1,
      src: e.value,
      theme: e.theme,
      collapsed: !e.expandToggle,
      displayDataTypes: !1,
      indentWidth: e.indent
    })
  })).setPropertyViewFn((e) => /* @__PURE__ */ p(g, {
    children: [/* @__PURE__ */ r(l, {
      name: n.basic,
      children: e.value.propertyView({
        label: a("export.jsonEditorDesc")
      })
    }), (o(t).editorModeStatus === "logic" || o(t).editorModeStatus === "both") && /* @__PURE__ */ p(l, {
      name: n.interaction,
      children: [v(e), e.expandToggle.propertyView({
        label: a("jsonExplorer.expandToggle")
      })]
    }), (o(t).editorModeStatus === "logic" || o(t).editorModeStatus === "both") && /* @__PURE__ */ r(l, {
      name: n.advanced,
      children: e.indent.propertyView({
        label: a("jsonExplorer.indent")
      })
    }), (o(t).editorModeStatus === "layout" || o(t).editorModeStatus === "both") && /* @__PURE__ */ r(l, {
      name: n.style,
      children: e.theme.propertyView({
        label: a("jsonExplorer.theme")
      })
    })]
  })).build();
}();
i = class extends i {
  autoHeight() {
    return !1;
  }
};
const N = y(i, [new E("value", a("jsonExplorer.valueDesc")), j]);
export {
  N as JsonExplorerComp
};
