(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".resizable-input{position:relative;box-sizing:border-box;padding:0 8px;display:inline-block;max-width:100%;text-overflow:ellipsis;overflow:hidden}.resizable-input__size-span{font-family:inherit;white-space:pre;display:inline-block;font-size:inherit;line-height:inherit;box-sizing:border-box;position:relative;left:0;opacity:0;min-width:2px;-webkit-user-select:none;user-select:none;vertical-align:top}.resizable-input input{border:none;outline:none;height:100%;text-overflow:ellipsis;font-family:inherit;background:none;color:inherit;top:0;left:0;right:0;font-size:inherit;line-height:inherit;position:absolute;box-sizing:border-box}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
import { defineComponent as p, computed as a, createElementBlock as u, openBlock as c, createElementVNode as o, normalizeStyle as m, toDisplayString as h, mergeProps as _ } from "vue";

const f = { class: "resizable-input" }, b = ["placeholder", "value", "disabled"], x = /* @__PURE__ */ p({
  __name: "ResizableInput",
  props: {
    modelValue: {},
    placeholder: {},
    disabled: { type: Boolean },
    maxWidth: {},
    width: {}
  },
  emits: ["update:modelValue"],
  setup(s, { emit: d }) {
    const t = s, n = d, i = a(() => {
      var e;
      return t.placeholder ? t.placeholder : (e = t.modelValue) == null ? void 0 : e.replace('"', "");
    }), l = a(() => {
      const e = {};
      return t.width && (e.width = t.width), t.maxWidth && (e.maxWidth = t.maxWidth), e;
    });
    function r(e) {
      n("update:modelValue", e.target.value);
    }
    return (e, v) => (c(), u("div", f, [
      o("span", {
        style: m(l.value),
        class: "resizable-input__size-span"
      }, h(i.value), 5),
      o("input", _(e.$attrs, {
        placeholder: e.placeholder,
        value: t.modelValue,
        disabled: t.disabled,
        style: l.value,
        onInput: r
      }), null, 16, b)
    ]));
  }
});
export {
  x as default
};
//# sourceMappingURL=ResizableInput.vue.js.map
