import { a4 as a, a3 as f, w as s, eg as c, V as h, aa as m, a5 as g, aG as y, U as b, H as t, eh as x, ei as S, ad as d, I as u, ae as o, af as r, am as l, ag as w, ah as v, aj as E, ai as C, aH as V, ak as j } from "./56c67d3b.js";
import { useContext as n } from "react";
import { defaultData as H } from "./0a417d48.js";
import "react-dom";
const T = [{
  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"
}], D = {
  "shapeshifter:inverted": "#ffffff",
  shapeshifter: "#000000",
  "grayscale:inverted": "#ffffff",
  grayscale: "#000000",
  "apathy:inverted": "#efffff",
  flat: "#2c3e50"
}, M = f.div`
  ${(i) => i.$animationStyle}
  height: 100%;
  overflow-y: scroll;
  background-color: ${(i) => D[i.$theme] || "#ffffff"};
  border: 1px solid #d7d9e0;
  border-radius: 4px;
  padding: 10px;
`;
let p = function() {
  const i = {
    value: s(c, JSON.stringify(H, null, 2)),
    autoHeight: s(V, "auto"),
    showVerticalScrollbar: h,
    indent: s(j, 4),
    expandToggle: h.DEFAULT_TRUE,
    theme: m(T, "shapeshifter:inverted"),
    animationStyle: g(y, "animationStyle")
  };
  return new b(i, (e) => /* @__PURE__ */ t(M, {
    $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 O = v(p, [new E("value", a("jsonExplorer.valueDesc")), C]);
export {
  O as JsonExplorerComp
};
