import { defineComponent, ref, watchEffect, watch, openBlock, createElementBlock, createVNode, mergeProps } from "vue";
import { _ as _sfc_main$1 } from "./index3.js";
import "./index4.js";
import "./index5.js";
import "@wltech/svg";
var index_vue_vue_type_style_index_0_lang = "";
const _hoisted_1 = { class: "wl-render-input" };
const __default__ = {
  name: "RfInput"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    modelValue: { default: "" }
  },
  emits: ["update:modelValue", "onChange"],
  setup(__props, { emit }) {
    const props = __props;
    const onInputChange = (val) => {
      emit("update:modelValue", val);
      emit("onChange", val);
    };
    const inputValue = ref("");
    watchEffect(() => {
      inputValue.value = props.modelValue;
    });
    watch(
      () => inputValue.value,
      (val) => {
        onInputChange(val);
      }
    );
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(_sfc_main$1, mergeProps({
          paddingLeft: 0,
          modelValue: inputValue.value,
          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
        }, _ctx.$attrs, { onOnChange: onInputChange }), null, 16, ["modelValue"])
      ]);
    };
  }
});
export { _sfc_main as default };
