import { useSSRContext, resolveComponent, mergeProps } from 'vue';
import { _ as _export_sfc, d as defineNuxtComponent, A as AClientForm, i as useAuthStore, s as storeToRefs$1, n as navigateTo } from '../server.mjs';
import { ssrRenderComponent } from 'vue/server-renderer';
import '../../nitro/node-server.mjs';
import 'node:http';
import 'node:https';
import 'fs';
import 'path';
import 'node:fs';
import 'node:url';
import 'unhead';
import '@unhead/shared';
import 'vue-router';
import '@ebec/http/core';
import 'hapic';
import '@hapic/oauth2';
import 'rapiq';
import '@hapic/vault';
import '@vuecs/navigation';
import 'change-case';
import '@vuecs/list-controls/core';
import 'smob';
import '@vuecs/list-controls';
import 'ilingo';
import '@vuelidate/validators';
import '@vuelidate/core';
import 'nanoid';
import '@vuecs/form-controls';
import '@vuecs/pagination';
import '@ucast/mongo2js';
import 'bootstrap-vue-next';
import '@vuecs/preset-bootstrap-v5';
import '@vuecs/preset-font-awesome';
import '@vuecs/countdown';
import '@vuecs/timeago';
import '@vuecs/form-controls/core';
import 'browser-storage-adapter';

const _sfc_main = defineNuxtComponent({
  components: {
    AClientForm
  },
  emits: ["failed", "created"],
  setup(props, { emit }) {
    const handleCreated = (e) => {
      navigateTo({ path: `/admin/clients/${e.id}` });
    };
    const handleFailed = (e) => {
      emit("failed", e);
    };
    const store = useAuthStore();
    const { realmManagementId } = storeToRefs$1(store);
    resolveComponent("AClientForm");
    return {
      realmManagementId,
      handleCreated,
      handleFailed
    };
  }
}, "$eYadHctvQ1");
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_AClientForm = resolveComponent("AClientForm");
  _push(ssrRenderComponent(_component_AClientForm, mergeProps({
    "realm-id": _ctx.realmManagementId,
    onCreated: _ctx.handleCreated,
    onFailed: _ctx.handleFailed
  }, _attrs), null, _parent));
}
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/admin/clients/index/add.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const add = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);

export { add as default };
//# sourceMappingURL=add-q7EY08fd.mjs.map
