"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const form = require("../../constants/form.js");
const index = require("../../../node_modules/@vueuse/core/index.js");
const Vue = require("vue");
function useCalcInputWidth() {
  const calculatorRef = Vue.shallowRef();
  const calculatorWidth = Vue.ref(0);
  const inputStyle = Vue.computed(() => ({ minWidth: `${Math.max(calculatorWidth.value, form.MINIMUM_INPUT_WIDTH)}px` }));
  const resetCalculatorWidth = () => {
    var _a;
    calculatorWidth.value = ((_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) ?? 0;
  };
  index.useResizeObserver(calculatorRef, resetCalculatorWidth);
  return {
    calculatorRef,
    calculatorWidth,
    inputStyle
  };
}
exports.useCalcInputWidth = useCalcInputWidth;
