import { defineComponent as v, computed as p, openBlock as n, createBlock as l, unref as m, normalizeProps as u, guardReactiveProps as a, withCtx as s, createVNode as I, createElementBlock as b, Fragment as _, renderList as R, resolveDynamicComponent as k } 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 y } 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 { ElRadioButton as B, ElRadio as E, ElRadioGroup as F } from "element-plus";
import x from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.mjs";
import { wetProFormItemProps as C } from "../../pro-form/src/types.mjs";
const H = /* @__PURE__ */ v({
  name: "WetFormRadio",
  __name: "radio",
  props: {
    ...C,
    formInputProps: {
      type: Object
    }
  },
  setup(i) {
    const o = i, f = p(() => {
      var r;
      return (r = o.formInputProps) != null && r.options ? o.formInputProps.options.map((e) => x(e) ? e : {
        label: e,
        value: e,
        disabled: !1
      }) : [];
    }), c = p(() => {
      var r;
      return ((r = o.formInputProps) == null ? void 0 : r.type) === "button" ? B : E;
    }), d = p(() => {
      const r = { ...o };
      return delete r.formInputProps, r;
    });
    return (r, e) => (n(), l(m(y), u(a(d.value)), {
      default: s(({ modelValue: P }) => [
        I(m(F), u(a({
          ...P,
          ...o.formInputProps
        })), {
          default: s(() => [
            (n(!0), b(_, null, R(f.value, (t) => (n(), l(k(c.value), {
              value: t.value,
              key: `${t.value}`,
              label: t.label
            }, null, 8, ["value", "label"]))), 128))
          ]),
          _: 2
        }, 1040)
      ]),
      _: 1
    }, 16));
  }
});
export {
  H as default
};
