import { defineComponent as v, computed as l, openBlock as p, createBlock as a, unref as n, normalizeProps as m, guardReactiveProps as u, withCtx as s, createVNode as b, createElementBlock as I, Fragment as _, renderList as h } from "vue";
import "../../confirm-button/index.mjs";
import "../../count-down-button/index.mjs";
import "../../ellipsis/index.mjs";
import "../../rich-text-editor/index.mjs";
import "../index.mjs";
import { WetProFormItem as k } from "../../pro-form/index.mjs";
import "../../pro-table/index.mjs";
import "../../pro-descriptions/index.mjs";
import "../../layout/index.mjs";
import "../../page/index.mjs";
import "../../guide/index.mjs";
import { ElSelect as F, ElOption as g } from "element-plus";
import x from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.mjs";
import { wetProFormItemProps as B } from "../../pro-form/src/types.mjs";
const A = /* @__PURE__ */ v({
  name: "WetFormSelect",
  __name: "select",
  props: {
    ...B,
    placeholder: String,
    formInputProps: {
      type: Object
    }
  },
  setup(c) {
    const e = c, i = l(() => {
      var r;
      return (r = e.formInputProps) != null && r.options ? e.formInputProps.options.map((o) => x(o) ? o : {
        label: o,
        value: o,
        disabled: !1
      }) : [];
    }), f = l(() => {
      const r = { ...e };
      return delete r.formInputProps, r;
    }), d = l(() => e.placeholder ? e.placeholder : `请选择${e.label}`);
    return (r, o) => (p(), a(n(k), m(u(f.value)), {
      default: s(({ modelValue: P }) => [
        b(n(F), m(u({
          ...P,
          placeholder: d.value,
          ...e.formInputProps
        })), {
          default: s(() => [
            (p(!0), I(_, null, h(i.value, (t) => (p(), a(n(g), {
              label: t.label,
              value: t.value,
              key: `${t.value}`
            }, null, 8, ["label", "value"]))), 128))
          ]),
          _: 2
        }, 1040)
      ]),
      _: 1
    }, 16));
  }
});
export {
  A as default
};
