import { c as create_ssr_component, b as subscribe, g as getContext, v as validate_component } from "../../../../../chunks/index-0e008fb3.js";
import "lodash/omit.js";
import { p as page } from "../../../../../chunks/stores-9eb273d1.js";
import { E as Editor } from "../../../../../chunks/editor-8f7742a9.js";
import { E as Entity } from "../../../../../chunks/entity-66c03936.js";
import "lodash/get.js";
const Create = create_ssr_component(($$result, $$props, $$bindings, slots) => {
  let $$unsubscribe_datastore;
  let $page, $$unsubscribe_page;
  let $models, $$unsubscribe_models;
  let $activeConfig, $$unsubscribe_activeConfig;
  $$unsubscribe_page = subscribe(page, (value) => $page = value);
  const activeConfig = getContext("stores").activeConfig;
  $$unsubscribe_activeConfig = subscribe(activeConfig, (value) => $activeConfig = value);
  const models = getContext("stores").models;
  $$unsubscribe_models = subscribe(models, (value) => $models = value);
  const datastore = getContext("stores").activeClient;
  $$unsubscribe_datastore = subscribe(datastore, (value) => value);
  let model;
  let events = [];
  let entity = {};
  let $$settled;
  let $$rendered;
  do {
    $$settled = true;
    model = $models[$page.params.model];
    $$rendered = `${!!model ? `<div class="${"flex flex-column h-screen"}"><div class="${"w-8/12"}">${!!entity ? `${validate_component(Entity, "Entity").$$render($$result, {
      activeConfig: $activeConfig,
      model,
      entity
    }, {
      entity: ($$value) => {
        entity = $$value;
        $$settled = false;
      }
    }, {})}` : ``}</div>

		<div class="${"w-4/12"}" style="${"background-color: #272822;"}">${`${validate_component(Editor, "Editor").$$render($$result, {
      language: "json",
      fontSize: "10px",
      isReadonly: true,
      value: JSON.stringify(events, null, 2)
    }, {}, {})}`}</div></div>` : ``}`;
  } while (!$$settled);
  $$unsubscribe_datastore();
  $$unsubscribe_page();
  $$unsubscribe_models();
  $$unsubscribe_activeConfig();
  return $$rendered;
});
export { Create as default };
