import { attachInternals as e } from "../utils/a11y.js";
//#region src/internal/controllers/state-pressed.controller.ts
function t() {
	return (e) => e.addInitializer((e) => new n(e));
}
var n = class {
	constructor(e) {
		this.host = e, this.host.addController(this);
	}
	hostConnected() {
		e(this.host);
	}
	hostUpdated() {
		this.host.pressed !== null && this.host.pressed !== void 0 && (this.host._internals.ariaPressed = `${this.host.pressed}`), this.host.pressed ? this.host._internals.states.add("pressed") : this.host._internals.states.delete("pressed"), this.host.readOnly && (this.host._internals.ariaPressed = null, this.host._internals.states.delete("pressed"));
	}
};
//#endregion
export { n as StatePressedController, t as statePressed };

//# sourceMappingURL=state-pressed.controller.js.map