// #region Imports
import { ElementValueAccessorBase } from '../../../../../Forms/Accessors/Abstracts/ElementValueAccessorBase';
// #endregion
/**
 * The `DataListElementValueAccessor` class.
 *
 * @public
 */
export class DataListElementValueAccessor extends ElementValueAccessorBase {
    // #region Methods
    /**
     * @public
     */
    hostConnected() {
        this.host.on('selectionChanged', (e) => this.writeValue(e.detail.newValue?.value ?? null));
        this.host.on('blur', () => this.onTouched());
    }
    /**
     * @public
     * @override
     */
    writeValue(value) {
        super.writeValue(value);
    }
    /**
     * @public
     * @override
     */
    resetValue() {
        super.resetValue();
    }
}
/**
 * The `dataListElementValueAccessor` function for the `DataListElement`.
 * This accessor can be bind to form field controls.
 *
 * @public
 */
export const dataListElementValueAccessor = (host) => new DataListElementValueAccessor(host);
//# sourceMappingURL=DataListElementValueAccessor.js.map