import { defineComponent as i, useSlots as p, computed as s, createBlock as u, openBlock as f, unref as a, mergeProps as m, createSlots as c, withCtx as g, renderSlot as b } from "vue";
import v from "../PlDropdown/PlDropdown.vue.js";
const k = {
  name: "PlDropdownRef"
}, h = /* @__PURE__ */ i({
  ...k,
  props: {
    modelValue: {},
    label: { default: "" },
    options: { default: void 0 },
    helper: { default: void 0 },
    loadingOptionsHelper: { default: void 0 },
    error: { default: void 0 },
    placeholder: { default: "..." },
    clearable: { type: Boolean, default: !1 },
    required: { type: Boolean, default: !1 },
    disabled: { type: Boolean, default: !1 },
    optionSize: { default: "small" }
  },
  emits: ["update:modelValue"],
  setup(t) {
    const n = p(), l = t, r = s(
      () => {
        var o;
        return (o = l.options) == null ? void 0 : o.map(
          (e) => "ref" in e ? {
            label: e.label,
            value: e.ref,
            group: e.group
          } : e
        );
      }
    );
    return (o, e) => (f(), u(a(v), m(l, {
      options: r.value,
      "loading-options-helper": o.loadingOptionsHelper,
      "arrow-icon-large": o.disabled ? "link-disabled" : "link",
      "onUpdate:modelValue": e[0] || (e[0] = (d) => o.$emit("update:modelValue", d))
    }), c({ _: 2 }, [
      a(n).tooltip ? {
        name: "tooltip",
        fn: g(() => [
          b(o.$slots, "tooltip")
        ]),
        key: "0"
      } : void 0
    ]), 1040, ["options", "loading-options-helper", "arrow-icon-large"]));
  }
});
export {
  h as default
};
//# sourceMappingURL=PlDropdownRef.vue.js.map
