import { Utility } from '../../core/utility'; const MASS_INPUT_CELL_SELECTOR = '.massinput__cell'; const MASS_INPUT_ADD_CELL_SELECTOR = '.massinput__cell--add'; const MASS_INPUT_SUBMIT_BUTTON_CLASS = 'massinput__submit-button'; const MASS_INPUT_INITIALIZED_CLASS = 'mass-input--initialized'; @Utility({ selector: '[uw-mass-input]', }) export class MassInput { _element; _app; _massInputId; _massInputFormSubmitHandler; _massInputForm; constructor(element, app) { if (!element) { throw new Error('Mass Input utility cannot be setup without an element!'); } this._element = element; this._app = app; if (this._element.classList.contains(MASS_INPUT_INITIALIZED_CLASS)) { return false; } this._massInputId = this._element.dataset.massInputIdent || '_'; this._massInputForm = this._element.closest('form'); if (!this._massInputForm) { throw new Error('Mass Input utility cannot be setup without being wrapped in a