import { defineComponent as m, ref as d, computed as u, createElementBlock as g, openBlock as c, createVNode as f, createBlock as b, unref as o } from "vue";
import { useI18n as C } from "vue-i18n";
import { k as _ } from "./start-CE9SawgU.js";
import "pinia";
import "./header-Bn1EKnBE.js";
import "./SettingInput-DIJQqVYx.js";
import "./SettingGroupedInputs-6DpUR1jL.js";
import "./SettingMultiBuilder-CBsgdK-i.js";
import "./SettingMultiValue-i-h7K71Y.js";
import "./SettingsElement-QE_or6_k.js";
import v from "./SettingSettings-jmj7rC_4.js";
const A = /* @__PURE__ */ m({
  __name: "GDMSettingConnectionSettings",
  props: {
    baseApi: {},
    connectionTypeClassName: {},
    namespace: { default: "Actindo\\Modules\\Actindo\\GlobalDriverManagement" }
  },
  setup(t) {
    const e = t, { t: p } = C(), i = d(), a = u(
      () => `${e.connectionTypeClassName}-${i.value?.id || ""}`
    );
    return (n, s) => (c(), g("div", null, [
      f(o(_), {
        data: `${n.baseApi}listConnections`,
        label: o(p)("gdm-plugin.gdm-connection-setting.selectConnection"),
        "item-title": "name",
        "item-value": "id",
        class: "pb-3",
        "menu-width": "800px",
        "prepend-text": "",
        search: "",
        "page-size": "",
        onChange: s[0] || (s[0] = (r) => i.value = r)
      }, null, 8, ["data", "label"]),
      (c(), b(o(v), {
        key: a.value,
        namespace: n.namespace,
        "hierarchy-key": "gdm_logger_connection",
        identifier: a.value,
        "save-endpoint": `${n.baseApi}setDataForConnection`,
        "fields-endpoint": `${n.baseApi}getFields`,
        "get-data-endpoint": `${n.baseApi}getAllDataForHierarchy`,
        autoload: ""
      }, null, 8, ["namespace", "identifier", "save-endpoint", "fields-endpoint", "get-data-endpoint"]))
    ]));
  }
});
function l(t) {
  const e = t;
  e.__i18n = e.__i18n || [], e.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "gdm-plugin": {
          "gdm-connection-setting": {
            selectConnection: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Select connection" } }
          }
        }
      },
      "de-DE": {
        "gdm-plugin": {
          "gdm-connection-setting": {
            selectConnection: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Verbindung auswählen" } }
          }
        }
      }
    }
  });
}
typeof l == "function" && l(A);
export {
  A as default
};
