import { attachInternals as e } from "../utils/a11y.js";
//#region src/internal/controllers/state-expanded.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.expanded !== null && this.host.expanded !== void 0 && (this.host._internals.ariaExpanded = `${this.host.expanded}`), this.host.expanded ? this.host._internals.states.add("expanded") : this.host._internals.states.delete("expanded"), this.host.readOnly && (this.host._internals.ariaExpanded = null, this.host._internals.states.delete("expanded"));
	}
};
//#endregion
export { n as StateExpandedController, t as stateExpanded };

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