import { _ as _export_sfc, d as defineNuxtComponent, x as AIdentityProviderLdapForm, j as useRuntimeConfig } from './server.mjs';
import { useSSRContext, resolveComponent, mergeProps } from 'vue';
import { ssrRenderComponent } from 'vue/server-renderer';
import '../runtime.mjs';
import 'node:http';
import 'node:https';
import 'fs';
import 'path';
import 'node:fs';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'devalue';
import '@unhead/ssr';
import 'unhead';
import '@unhead/shared';
import 'vue-router';
import 'hapic';
import '@hapic/oauth2';
import 'rapiq';
import '@hapic/vault';
import '@vuecs/navigation';
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: {
    AIdentityProviderLdapForm
  },
  props: {
    entity: {
      type: Object,
      required: true
    }
  },
  emits: ["updated", "failed"],
  setup(props, { emit }) {
    const handleUpdated = (e) => {
      emit("updated", e);
    };
    const handleFailed = (e) => {
      emit("failed", e);
    };
    const runtimeConfig = useRuntimeConfig();
    return {
      apiUrl: runtimeConfig.public.apiUrl,
      entity: props.entity,
      handleUpdated,
      handleFailed
    };
  }
}, "$okrNJVjSQE");
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_AIdentityProviderLdapForm = resolveComponent("AIdentityProviderLdapForm");
  const _component_AIdentityProviderOAuth2Form = resolveComponent("AIdentityProviderOAuth2Form");
  if (_ctx.entity.protocol === "ldap") {
    _push(ssrRenderComponent(_component_AIdentityProviderLdapForm, mergeProps({
      entity: _ctx.entity,
      "realm-id": _ctx.entity.realm_id,
      onUpdated: _ctx.handleUpdated,
      onFailed: _ctx.handleFailed
    }, _attrs), null, _parent));
  } else {
    _push(ssrRenderComponent(_component_AIdentityProviderOAuth2Form, mergeProps({
      "api-url": _ctx.apiUrl,
      entity: _ctx.entity,
      "realm-id": _ctx.entity.realm_id,
      onUpdated: _ctx.handleUpdated,
      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/identity-providers/[id]/index.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);

export { index as default };
//# sourceMappingURL=index-Iu40JUBh.mjs.map
