import { Y as a, X as f, w as s, eb as c, O as h, a3 as m, Z as g, az as y, U as b, F as t, dk as x, ec as S, a6 as d, G as u, a7 as o, a8 as r, af as l, a9 as w, aa as v, ac as E, ab as C, aA as V, ad as j } from "./603b75d9.js";
import { useContext as n } from "react";
import { defaultData as T } from "./0a417d48.js";
import "react-dom";
const D = [{
  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"
}], M = {
  "shapeshifter:inverted": "#ffffff",
  shapeshifter: "#000000",
  "grayscale:inverted": "#ffffff",
  grayscale: "#000000",
  "apathy:inverted": "#efffff",
  flat: "#2c3e50"
}, H = f.div`
  ${(i) => i.$animationStyle}
  height: 100%;
  overflow-y: scroll;
  background-color: ${(i) => M[i.$theme] || "#ffffff"};
  border: 1px solid #d7d9e0;
  border-radius: 4px;
  padding: 10px;
`;
let p = function() {
  const i = {
    value: s(c, JSON.stringify(T, null, 2)),
    autoHeight: s(V, "auto"),
    showVerticalScrollbar: h,
    indent: s(j, 4),
    expandToggle: h.DEFAULT_TRUE,
    theme: m(D, "shapeshifter:inverted"),
    animationStyle: g(y, "animationStyle")
  };
  return new b(i, (e) => /* @__PURE__ */ t(H, {
    $theme: e.theme,
    $animationStyle: e.animationStyle,
    children: /* @__PURE__ */ t(x, {
      hideScrollbar: !e.showVerticalScrollbar,
      children: /* @__PURE__ */ t(S, {
        name: !1,
        src: e.value,
        theme: e.theme,
        collapsed: !e.expandToggle,
        displayDataTypes: !1,
        indentWidth: e.indent
      })
    })
  })).setPropertyViewFn((e) => /* @__PURE__ */ d(u, {
    children: [/* @__PURE__ */ t(o, {
      name: r.basic,
      children: e.value.propertyView({
        label: a("export.jsonEditorDesc")
      })
    }), (n(l).editorModeStatus === "logic" || n(l).editorModeStatus === "both") && /* @__PURE__ */ d(o, {
      name: r.interaction,
      children: [w(e), e.expandToggle.propertyView({
        label: a("jsonExplorer.expandToggle")
      })]
    }), (n(l).editorModeStatus === "logic" || n(l).editorModeStatus === "both") && /* @__PURE__ */ t(o, {
      name: r.advanced,
      children: e.indent.propertyView({
        label: a("jsonExplorer.indent")
      })
    }), /* @__PURE__ */ t(o, {
      name: a("prop.height"),
      children: e.autoHeight.propertyView({
        label: a("prop.height")
      })
    }), !e.autoHeight.getView() && /* @__PURE__ */ t(o, {
      name: r.layout,
      children: e.showVerticalScrollbar.propertyView({
        label: a("prop.showVerticalScrollbar")
      })
    }), (n(l).editorModeStatus === "layout" || n(l).editorModeStatus === "both") && /* @__PURE__ */ d(u, {
      children: [/* @__PURE__ */ t(o, {
        name: r.style,
        children: e.theme.propertyView({
          label: a("jsonExplorer.theme")
        })
      }), /* @__PURE__ */ t(o, {
        name: r.animationStyle,
        hasTooltip: !0,
        children: e.animationStyle.getPropertyView()
      })]
    })]
  })).build();
}();
p = class extends p {
  autoHeight() {
    return this.children.autoHeight.getView();
  }
};
const k = v(p, [new E("value", a("jsonExplorer.valueDesc")), C]);
export {
  k as JsonExplorerComp
};
