import { defineComponent as c, computed as a, openBlock as i, createBlock as s, unref as l, normalizeProps as u, guardReactiveProps as d, withCtx as f, createVNode as P, mergeProps 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 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 { ElDatePicker as I } from "element-plus";
import { wetProFormItemProps as _ } from "../../pro-form/src/types.mjs";
const E = /* @__PURE__ */ c({
  name: "WetFormDatePicker",
  __name: "date-picker",
  props: {
    ..._,
    placeholder: [String, Array],
    formInputProps: {
      type: Object
    }
  },
  setup(m) {
    const r = m, o = a(() => {
      var e, p, t;
      return ((e = r.formInputProps) == null ? void 0 : e.type) === "daterange" || ((p = r.formInputProps) == null ? void 0 : p.type) === "datetimerange" || ((t = r.formInputProps) == null ? void 0 : t.type) === "monthrange" ? Array.isArray(r.placeholder) ? r.placeholder : ["请选择开始时间", "请选择结束时间"] : r.placeholder ? r.placeholder : `请选择${r.label}`;
    }), n = a(() => {
      const e = { ...r };
      return delete e.formInputProps, e;
    });
    return (e, p) => (i(), s(l(y), u(d(n.value)), {
      default: f(({
        modelValue: t
      }) => [
        P(l(I), h({
          ...t,
          placeholder: Array.isArray(o.value) ? "" : o.value,
          ...r.formInputProps
        }, {
          "start-placeholder": o.value[0],
          "end-placeholder": o.value[1]
        }), null, 16, ["start-placeholder", "end-placeholder"])
      ]),
      _: 1
    }, 16));
  }
});
export {
  E as default
};
